diff options
Diffstat (limited to 'subx/035labels.cc')
-rw-r--r-- | subx/035labels.cc | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/subx/035labels.cc b/subx/035labels.cc index db54d329..c7274613 100644 --- a/subx/035labels.cc +++ b/subx/035labels.cc @@ -53,7 +53,6 @@ loop: :(before "End Level-2 Transforms") Transform.push_back(rewrite_labels); - :(code) void rewrite_labels(program& p) { trace(99, "transform") << "-- rewrite labels" << end(); @@ -190,19 +189,19 @@ string drop_last(const string& s) { # op subop mod rm32 base index scale r32 # 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes # address 1 -loop: -loop2: + $loop: + $loop2: # address 1 (labels take up no space) 05 0x0d0c0b0a/imm32 # add to EAX # address 6 - eb loop2/disp8 + eb $loop2/disp8 # address 8 - eb loop3/disp8 + eb $loop3/disp8 # address 10 -loop3: -+transform: label 'loop' is at address 1 -+transform: label 'loop2' is at address 1 -+transform: label 'loop3' is at address 10 + $loop3: ++transform: label '$loop' is at address 1 ++transform: label '$loop2' is at address 1 ++transform: label '$loop3' is at address 10 # first jump is to -7 +transform: instruction after transform: 'eb f9' # second jump is to 0 (fall through) @@ -234,6 +233,6 @@ xz: # instruction effective address operand displacement immediate # op subop mod rm32 base index scale r32 # 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes - -a: # indent to avoid looking like a trace_should_not_contain command + -a: # indent to avoid looking like a trace_should_not_contain command for this scenario 05 0x0d0c0b0a/imm32 # add to EAX +error: '-a' starts with '-', which can be confused with a negative number; use a different name |