mirror of
https://github.com/open-simh/simtools.git
synced 2026-02-27 01:00:11 +00:00
Rename 'rel' field to 'pcrel'.
This commit is contained in:
@@ -511,7 +511,7 @@ void mode_extension(
|
||||
}
|
||||
|
||||
if (value->type == EX_LIT) {
|
||||
if (mode->rel) { /* PC-relative? */
|
||||
if (mode->pcrel) { /* PC-relative? */
|
||||
if (current_pc->section->flags & PSECT_REL) {
|
||||
store_displaced_word(str, tr, 2, value->data.lit);
|
||||
} else {
|
||||
@@ -527,7 +527,7 @@ void mode_extension(
|
||||
if (SYM_IS_IMPORTED(sym)) {
|
||||
/* Reference to a global symbol. */
|
||||
/* Global symbol plus offset */
|
||||
if (mode->rel)
|
||||
if (mode->pcrel)
|
||||
store_global_displaced_offset_word(str, tr, 2, offset, sym->label);
|
||||
else
|
||||
store_global_offset_word(str, tr, 2, offset, sym->label);
|
||||
@@ -535,14 +535,14 @@ void mode_extension(
|
||||
/* Relative to non-external symbol. */
|
||||
if (current_pc->section == sym->section) {
|
||||
/* In the same section */
|
||||
if (mode->rel) {
|
||||
if (mode->pcrel) {
|
||||
/* I can compute this myself. */
|
||||
store_word(str, tr, 2, sym->value + offset - DOT - 2);
|
||||
} else
|
||||
store_internal_word(str, tr, 2, sym->value + offset);
|
||||
} else {
|
||||
/* In a different section */
|
||||
if (mode->rel)
|
||||
if (mode->pcrel)
|
||||
store_psect_displaced_offset_word(str, tr, 2, sym->value + offset, sym->section->label);
|
||||
else
|
||||
store_psect_offset_word(str, tr, 2, sym->value + offset, sym->section->label);
|
||||
@@ -551,7 +551,7 @@ void mode_extension(
|
||||
} else {
|
||||
/* Complex relocation */
|
||||
|
||||
if (mode->rel)
|
||||
if (mode->pcrel)
|
||||
store_complex_displaced(str, tr, 2, mode->offset);
|
||||
else
|
||||
store_complex(str, tr, 2, mode->offset);
|
||||
|
||||
@@ -15,7 +15,7 @@ typedef struct addr_mode {
|
||||
/* bit 3 is indirect */
|
||||
/* bits 4:6 are mode, where 0=Rn, 1=(Rn)+,
|
||||
2=-(Rn), 3=offset(Rn) */
|
||||
int rel; /* the addressing mode is PC-relative */
|
||||
int pcrel; /* the addressing mode is PC-relative */
|
||||
EX_TREE *offset; /* Expression giving the offset */
|
||||
} ADDR_MODE;
|
||||
|
||||
|
||||
12
parse.c
12
parse.c
@@ -194,8 +194,8 @@ int get_mode(
|
||||
EX_TREE *value;
|
||||
|
||||
mode->offset = NULL;
|
||||
mode->rel = 0;
|
||||
mode->type = 0;
|
||||
mode->pcrel = 0;
|
||||
mode->type = MODE_REG;
|
||||
|
||||
cp = skipwhite(cp);
|
||||
|
||||
@@ -356,13 +356,13 @@ int get_mode(
|
||||
if (mode->type & MODE_INDIRECT) { /* Have already noted indirection? */
|
||||
mode->type |= MODE_OFFSET|MODE_PC;/* If so, then PC-relative is the only
|
||||
option */
|
||||
mode->rel = 1; /* Note PC-relative */
|
||||
mode->pcrel = 1; /* Note PC-relative */
|
||||
} else if (enabl_ama) { /* User asked for absolute adressing? */
|
||||
mode->type |= MODE_INDIRECT|MODE_AUTO_INCR|MODE_PC;
|
||||
/* Give it to him. */
|
||||
} else {
|
||||
mode->type |= MODE_OFFSET|MODE_PC; /* PC-relative */
|
||||
mode->rel = 1; /* Note PC-relative */
|
||||
mode->pcrel = 1; /* Note PC-relative */
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
@@ -389,8 +389,8 @@ int get_fp_src_mode(
|
||||
int ret = parse_float(cp, &fltendp, 1, flt);
|
||||
|
||||
if (ret) {
|
||||
mode->type = 027;
|
||||
mode->rel = 0;
|
||||
mode->type = MODE_AUTO_INCR | MODE_PC;
|
||||
mode->pcrel = 0;
|
||||
mode->offset = new_ex_lit(flt[0]);
|
||||
mode->offset->cp = fltendp;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user