diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2002-02-04 12:29:15 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@redhat.com> | 2002-02-04 12:29:15 +0000 |
commit | 7679ead9b557680adbce726b7024cb8f6fa0e08f (patch) | |
tree | 920f83b86145f5da94db5f249983f162b3f00edc /gas/config/tc-sh.c | |
parent | 0b3301c329b795e789267f18fbe1efd45d002eb9 (diff) | |
download | fsf-binutils-gdb-7679ead9b557680adbce726b7024cb8f6fa0e08f.zip fsf-binutils-gdb-7679ead9b557680adbce726b7024cb8f6fa0e08f.tar.gz fsf-binutils-gdb-7679ead9b557680adbce726b7024cb8f6fa0e08f.tar.bz2 |
* config/tc-sh.c (parse_at): Set arg type of @(expr,pc) to
A_DISP_PC only if it's an integral constant, and to
A_DISP_PC_ABS otherwise.
(get_specific): Accept A_DISP_PC_ABS where A_DISP_PC is
expected.
(build_Mytes): Mark PCRELIMM fix-ups as pc-relative only if
the operand type is not A_DISP_PC_ABS.
Diffstat (limited to 'gas/config/tc-sh.c')
-rw-r--r-- | gas/config/tc-sh.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/gas/config/tc-sh.c b/gas/config/tc-sh.c index fa9869f..ce780a1 100644 --- a/gas/config/tc-sh.c +++ b/gas/config/tc-sh.c @@ -984,10 +984,12 @@ parse_at (src, op) /* Turn a plain @(4,pc) into @(.+4,pc). */ if (op->immediate.X_op == O_constant) { - op->immediate.X_add_symbol = dot(); + op->immediate.X_add_symbol = dot (); op->immediate.X_op = O_symbol; + op->type = A_DISP_PC; } - op->type = A_DISP_PC; + else + op->type = A_DISP_PC_ABS; } else { @@ -1169,11 +1171,14 @@ get_specific (opcode, operands) switch (arg) { + case A_DISP_PC: + if (user->type == A_DISP_PC_ABS) + break; + /* Fall through. */ case A_IMM: case A_BDISP12: case A_BDISP8: case A_DISP_GBR: - case A_DISP_PC: case A_MACH: case A_PR: case A_MACL: @@ -1603,10 +1608,12 @@ build_Mytes (opcode, operand) insert (output + low_byte, BFD_RELOC_SH_IMM8, 0, operand + 1); break; case PCRELIMM_8BY4: - insert (output, BFD_RELOC_SH_PCRELIMM8BY4, 1, operand); + insert (output, BFD_RELOC_SH_PCRELIMM8BY4, + operand->type != A_DISP_PC_ABS, operand); break; case PCRELIMM_8BY2: - insert (output, BFD_RELOC_SH_PCRELIMM8BY2, 1, operand); + insert (output, BFD_RELOC_SH_PCRELIMM8BY2, + operand->type != A_DISP_PC_ABS, operand); break; case REPEAT: output = insert_loop_bounds (output, operand); |