mirror of
https://github.com/open-simh/simtools.git
synced 2026-01-13 23:36:03 +00:00
Make sure immediate operands #R0 etc are output as absolute values.
Previously it was generated as relocatable.
This commit is contained in:
parent
1c37223977
commit
3c858fe45d
@ -531,6 +531,10 @@ void mode_extension(
|
||||
store_global_displaced_offset_word(str, tr, 2, offset, sym->label);
|
||||
else
|
||||
store_global_offset_word(str, tr, 2, offset, sym->label);
|
||||
} else if (sym->section->type == SECTION_REGISTER) {
|
||||
/* Delayed action: evaluate_rec() excludes SECTION_REGISTER when
|
||||
* turning symbols into EX_LIT. Do it here now. */
|
||||
store_word(str, tr, 2, sym->value + offset);
|
||||
} else {
|
||||
/* Relative to non-external symbol. */
|
||||
if (current_pc->section == sym->section) {
|
||||
|
||||
@ -10,4 +10,11 @@ start: .word 123 ; 1 word
|
||||
.word 1,,3 ; 3 words
|
||||
.word 1,2,3 ; 3 words
|
||||
|
||||
; all the values below are not relocatable.
|
||||
.word r0,wait,r1+1,wait+2,%4,%4+1 ; 0, 1, 2, 3, 4, 5
|
||||
mov #r0,r0
|
||||
mov #wait,r0
|
||||
mov #r1+1,r0
|
||||
mov #wait+2,r0
|
||||
mov #%4,r0
|
||||
mov #%4+1,r0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user