mirror of
https://github.com/fadden/6502bench.git
synced 2026-04-27 03:17:45 +00:00
Treat PEA operand as imm const16
We were treating PEA's operand as an absolute address and attempting to extend it to 24 bits. This wasn't very successful, and was counter-productive when the argument was actually a constant, which is common. Worse, if the operand appeared to reference an internal address outside bank 0, we would output a 24-bit value, breaking 64tass and cc65. We now treat PEA as having an immediate operand. (It was already classified as an "extended immediate", but the operand-address computation was still happening.) This will have little to no effect on projects that use OMF relocation data, because PEA arguments are explicitly identified as symbols or constants. New tests were added to 20032-labels-and-symbols to exercise the code generation failures. A few other tests that used PEA were affected. 20152-local-variables was fixed by adding a symbolic reference, the others remained as-is and the expected output was revised. (issue #172)
This commit is contained in:
1 parent
859a22fe60
commit
4846a26c9a
20 files changed
+293
-101
No files matched your search
+1
-1
@@ -81,7 +81,7 @@ namespace Asm65 {
|
||||
Implied, // OP 1
|
||||
PCRel, // OP label 2 (BCC, BNE, ...)
|
||||
PCRelLong, // OP label 3 (BRL)
|
||||
StackAbs, // OP addr 3 (PEA)
|
||||
StackAbs, // OP addr 3 (PEA), treat as imm const16
|
||||
StackDPInd, // OP (dp) 2 (PEI)
|
||||
StackInt, // OP 2 (BRK, COP)
|
||||
StackPCRelLong, // OP label 3 (PER)
|
||||
|
||||
Reference in new issue
Block a user