diff options
author | Robert de Bath <rdebath@poboxes.com> | 1997-05-09 19:36:29 +0200 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2013-10-23 23:39:48 +0200 |
commit | e63c244cb22bf48ca1d2695784a072269d19ea96 (patch) | |
tree | 45b9018259f43db629b27395783cf48e55a85eee /copt | |
parent | 4c36e9a0c125ccfff37aa440dab2cf58c4152fff (diff) | |
download | dev86-e63c244cb22bf48ca1d2695784a072269d19ea96.tar.gz |
Import Dev86src-0.12.0.tar.gzv0.12.0
Diffstat (limited to 'copt')
-rw-r--r-- | copt/copt.diff | 72 | ||||
-rw-r--r-- | copt/rules.86 | 21 |
2 files changed, 83 insertions, 10 deletions
diff --git a/copt/copt.diff b/copt/copt.diff new file mode 100644 index 0000000..89d3686 --- /dev/null +++ b/copt/copt.diff @@ -0,0 +1,72 @@ +diff -rc linux-86.orig/copt/copt.c linux-86/copt/copt.c +*** linux-86.orig/copt/copt.c Tue Feb 18 21:31:34 1997 +--- linux-86/copt/copt.c Tue Apr 22 14:11:05 1997 +*************** +*** 303,314 **** + } + + +- +- /* +- * Eval an expression into an integer number +- */ +- static long eval(char *str, int len) +- { + #define NO_OP 0 + #define ADD_OP 1 + #define SUB_OP 2 +--- 303,308 ---- +*************** +*** 317,330 **** + #define SHL_OP 5 + #define SHR_OP 6 + +! char *oldcp, *cp, c; +! long retval = 0; +! long num = 0; +! int sign = 1; +! int base = 10; +! int state = 0; +! int op = NO_OP; +! int i, varnum; + + /* Apply operation to current numeric value */ + static void doretval(void) +--- 311,321 ---- + #define SHL_OP 5 + #define SHR_OP 6 + +! static int op = NO_OP; +! static long retval = 0; +! static long num = 0; +! static int sign = 1; +! static int base = 10; + + /* Apply operation to current numeric value */ + static void doretval(void) +*************** +*** 350,355 **** +--- 341,363 ---- + sign = 1; + base = 10; + } ++ ++ ++ /* ++ * Eval an expression into an integer number ++ */ ++ static long eval(char *str, int len) ++ { ++ ++ char *oldcp, *cp, c; ++ int state = 0; ++ int i, varnum; ++ ++ op = NO_OP; ++ retval = 0; ++ num = 0; ++ sign = 1; ++ base = 10; + + /* Scan through whole string and decode it */ + for (cp = str, i = 0; *cp && i < len; cp++, i++) { diff --git a/copt/rules.86 b/copt/rules.86 index d4fe131..b4030cd 100644 --- a/copt/rules.86 +++ b/copt/rules.86 @@ -2,10 +2,9 @@ # Rules for loading short variables -# Chad says this one (I think) is broken -# mov %0$0[%2],%3 -# = -# mov %0[%2],%3 +mov %0$0[%2],%3 += +mov %0[%2],%3 mov %2,%[ax|bx|cx|dx]1 mov %[ax|bx|cx|dx]1,%2 @@ -131,12 +130,14 @@ stosb # Rules for manipulating short values -mov %[ax|bx]2,%1 -%[add|and|xor|sub|or]4 %[ax|bx]2,%3 -mov %1,%[ax|bx]2 -= -mov %2,%3 -%4 %1,%2 +# This is the broken rule - Chad + +#mov %[ax|bx]2,%1 +#%[add|and|xor|sub|or]4 %[ax|bx]2,%3 +#mov %1,%[ax|bx]2 +#= +#mov %2,%3 +#%4 %1,%2 mov %[ax|bx]2,%1 %[add|and|xor|or]4 %[ax|bx]2,%3 |