Mercurial > hg > index.cgi
comparison lwasm/insn_rtor.c @ 367:c6d2a1f54e0c
Change processor target variations to pragmas.
Add "pragma 6809" and "pragma 6309" which select the processor target rather
than a global flag. The command line switches set or reset the pragma
appropriately.
Thanks to Erik G <erik@6809.org> for the patch.
author | William Astle <lost@l-w.ca> |
---|---|
date | Mon, 15 Jun 2015 21:21:58 -0600 |
parents | 3a5f718b24c1 |
children | 8764142b3192 |
comparison
equal
deleted
inserted
replaced
366:433dbc18fb41 | 367:c6d2a1f54e0c |
---|---|
32 // register to register (r0,r1) | 32 // register to register (r0,r1) |
33 // registers are in order: | 33 // registers are in order: |
34 // D,X,Y,U,S,PC,W,V | 34 // D,X,Y,U,S,PC,W,V |
35 // A,B,CC,DP,0,0,E,F | 35 // A,B,CC,DP,0,0,E,F |
36 | 36 |
37 r0 = lwasm_lookupreg2((as -> target == TARGET_6309) ? regs : regs9, p); | 37 r0 = lwasm_lookupreg2(!CURPRAGMA(l, PRAGMA_6809) ? regs : regs9, p); |
38 if (r0 < 0 || *(*p)++ != ',') | 38 if (r0 < 0 || *(*p)++ != ',') |
39 { | 39 { |
40 lwasm_register_error(as, l, "Bad operand"); | 40 lwasm_register_error(as, l, "Bad operand"); |
41 r0 = r1 = 0; | 41 r0 = r1 = 0; |
42 } | 42 } |
43 else | 43 else |
44 { | 44 { |
45 r1 = lwasm_lookupreg2((as -> target == TARGET_6309) ? regs : regs9, p); | 45 r1 = lwasm_lookupreg2(!CURPRAGMA(l, PRAGMA_6809) ? regs : regs9, p); |
46 if (r1 < 0) | 46 if (r1 < 0) |
47 { | 47 { |
48 lwasm_register_error(as, l, "Bad operand"); | 48 lwasm_register_error(as, l, "Bad operand"); |
49 r0 = r1 = 0; | 49 r0 = r1 = 0; |
50 } | 50 } |