Mattia -- > there is something wrong with, uh, something... > Currently substr is named substr_s_s_i. > if I write substr_s_s_i S9, S1, I0, I1, all is good. > if I write substr S9, S1, I0, I1, I get an assembler error. The assembler uses some simple logic to infer the full opcode from the abbreviated one. The problem is that the opcodes are not named according to a (simple) rule. If folks agree that there should be an explicit set of rules for determining the abbreviated opcode from the fully qualified opcode (which would have _x's for *every* argument), then we can get rid of this kind of problem pretty easily. I have just committed a program called 'opcheck.pl' that reads through opcode_table looking for errors and comparing opcode names to those that would be expected by the following simple rules: * If the types are all the same, collapse them to one. * If the first two types are the same (as with set_i == set I I), omit the first type. * If the last two types are 'D', omit the last type. * There are exceptions for the zero-arg yet type-specific ops: {clear,pop,push}_[inps] Assuming that folks like the idea of verifying that all ops adhere to a consisent set of naming rules, then any time opcode_table is edited, opcheck.pl should be run before committing the changes. That is not to say that everyone will agree that these should be the rules, but at least they are a "stake in the ground" from which we can start. Does anyone disagree with the notion that some simple set of rules should determine the abbreviated opcode name from the fully qualified opcode name? Does anyone have a better set of rules than those I listed above? I'm attaching the output of running opcheck.pl on the current opcode table for your information. Regards, -- Gregor _____________________________________________________________________ / perl -e 'srand(-2091643526); print chr rand 90 for (0..4)' \ Gregor N. Purdy [EMAIL PROTECTED] Focus Research, Inc. http://www.focusresearch.com/ 8080 Beckett Center Drive #203 513-860-3570 vox West Chester, OH 45069 513-860-3579 fax \_____________________________________________________________________/
opcheck.pl: ERROR: Opcode substr_s_s_i does not meet standard on line 60 (expected substr_s_i_i): * Collapsed leading 's_s' of 's_s_i_i' to 's'. opcheck.pl: ERROR: Opcode sin_n_n does not meet standard on line 111 (expected sin_n): * Collapsed 'n_n' to single 'n'. opcheck.pl: ERROR: Opcode cos_n_n does not meet standard on line 112 (expected cos_n): * Collapsed 'n_n' to single 'n'. opcheck.pl: ERROR: Opcode tan_n_n does not meet standard on line 113 (expected tan_n): * Collapsed 'n_n' to single 'n'. opcheck.pl: ERROR: Opcode sec_n_n does not meet standard on line 114 (expected sec_n): * Collapsed 'n_n' to single 'n'. opcheck.pl: ERROR: Opcode atan_n_n does not meet standard on line 115 (expected atan_n): * Collapsed 'n_n' to single 'n'. opcheck.pl: ERROR: Opcode atan2_n_n_n does not meet standard on line 116 (expected atan2_n): * Collapsed 'n_n_n' to single 'n'. opcheck.pl: ERROR: Opcode asin_n_n does not meet standard on line 117 (expected asin_n): * Collapsed 'n_n' to single 'n'. opcheck.pl: ERROR: Opcode acos_n_n does not meet standard on line 118 (expected acos_n): * Collapsed 'n_n' to single 'n'. opcheck.pl: ERROR: Opcode asec_n_n does not meet standard on line 119 (expected asec_n): * Collapsed 'n_n' to single 'n'. opcheck.pl: ERROR: Opcode cosh_n_n does not meet standard on line 120 (expected cosh_n): * Collapsed 'n_n' to single 'n'. opcheck.pl: ERROR: Opcode sinh_n_n does not meet standard on line 121 (expected sinh_n): * Collapsed 'n_n' to single 'n'. opcheck.pl: ERROR: Opcode tanh_n_n does not meet standard on line 122 (expected tanh_n): * Collapsed 'n_n' to single 'n'. opcheck.pl: ERROR: Opcode sech_n_n does not meet standard on line 123 (expected sech_n): * Collapsed 'n_n' to single 'n'. opcheck.pl: ERROR: Opcode log2_n_n does not meet standard on line 124 (expected log2_n): * Collapsed 'n_n' to single 'n'. opcheck.pl: ERROR: Opcode log10_n_n does not meet standard on line 125 (expected log10_n): * Collapsed 'n_n' to single 'n'. opcheck.pl: ERROR: Opcode ln_n_n does not meet standard on line 126 (expected ln_n): * Collapsed 'n_n' to single 'n'. opcheck.pl: ERROR: Opcode exp_n_n does not meet standard on line 127 (expected exp_n): * Collapsed 'n_n' to single 'n'. opcheck.pl: ERROR: Opcode pow_n_n_n does not meet standard on line 128 (expected pow_n): * Collapsed 'n_n_n' to single 'n'. opcheck.pl: ERROR: Opcode atan2_n_n_i does not meet standard on line 134 (expected atan2_n_i): * Collapsed leading 'n_n' of 'n_n_i' to 'n'. opcheck.pl: ERROR: Opcode pow_n_n_i does not meet standard on line 148 (expected pow_n_i): * Collapsed leading 'n_n' of 'n_n_i' to 'n'. opcheck.pl: Found 21 errors.