aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2000-08-25 18:40:16 +0000
committerNick Clifton <nickc@redhat.com>2000-08-25 18:40:16 +0000
commit1e8d20f4cc9ca76341801e68c7759805e370c18a (patch)
tree2b8e1c786183d4fe1ab50609bb0adf89c82297a8 /gas
parentdf115219751523bcaaeea68a4707f2dcad0b7c01 (diff)
downloadgdb-1e8d20f4cc9ca76341801e68c7759805e370c18a.zip
gdb-1e8d20f4cc9ca76341801e68c7759805e370c18a.tar.gz
gdb-1e8d20f4cc9ca76341801e68c7759805e370c18a.tar.bz2
Correctly calculate the pc relative offset of the target destination for jmp
instructions.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog6
-rw-r--r--gas/config/tc-vax.c8
2 files changed, 10 insertions, 4 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 02f3661..effaaaa 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,9 @@
+2000-08-25 J. David Anglin <dave@hiauly1.hia.nrc.ca>
+
+ * tc-vax.c (md_convert_frag): Correctly calculate the pc relative
+ offset of the target destination for jmp instructions.
+ (md_assemble): Change mode to VAX_ABSOLUTE_MODE as per comments.
+
2000-08-24 Hans-Peter Nilsson <hp@axis.com>
* NEWS: Mention support for CRIS.
diff --git a/gas/config/tc-vax.c b/gas/config/tc-vax.c
index acf78ee..2342922 100644
--- a/gas/config/tc-vax.c
+++ b/gas/config/tc-vax.c
@@ -775,7 +775,7 @@ md_assemble (instruction_string)
p[1] = VAX_BRB;
p[2] = 6;
p[3] = VAX_JMP;
- p[4] = VAX_PC_RELATIVE_MODE + 1; /* @#... */
+ p[4] = VAX_ABSOLUTE_MODE; /* @#... */
md_number_to_chars (p + 5, this_add_number, 4);
/*
* Now (eg) xOBxxx 1f
@@ -1349,7 +1349,7 @@ md_convert_frag (headers, seg, fragP)
addressP[0] = 6;
addressP[1] = VAX_JMP;
addressP[2] = VAX_PC_RELATIVE_MODE;
- md_number_to_chars (addressP + 3, target_address, 4);
+ md_number_to_chars (addressP + 3, target_address - (address_of_var + 7), 4);
extension = 7;
break;
@@ -1383,7 +1383,7 @@ md_convert_frag (headers, seg, fragP)
addressP[3] = 6;
addressP[4] = VAX_JMP;
addressP[5] = VAX_PC_RELATIVE_MODE;
- md_number_to_chars (addressP + 6, target_address, 4);
+ md_number_to_chars (addressP + 6, target_address - (address_of_var + 10), 4);
extension = 10;
break;
@@ -1407,7 +1407,7 @@ md_convert_frag (headers, seg, fragP)
addressP[2] = 6;
addressP[3] = VAX_JMP;
addressP[4] = VAX_PC_RELATIVE_MODE;
- md_number_to_chars (addressP + 5, target_address, 4);
+ md_number_to_chars (addressP + 5, target_address - (address_of_var + 9), 4);
extension = 9;
break;