aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Krebbel <krebbel@linux.ibm.com>2018-09-25 17:13:28 +0200
committerAndreas Krebbel <krebbel@linux.ibm.com>2018-09-25 17:13:28 +0200
commit3d6e0c015aa832f00ccd4fe3f5f43b90357258e8 (patch)
tree6874fe778b5ebf5b076ac56b22824f84dde7127d
parent49b036f1e0616b57294d85b06d3eb001b34f9958 (diff)
downloadgdb-3d6e0c015aa832f00ccd4fe3f5f43b90357258e8.zip
gdb-3d6e0c015aa832f00ccd4fe3f5f43b90357258e8.tar.gz
gdb-3d6e0c015aa832f00ccd4fe3f5f43b90357258e8.tar.bz2
S/390: Fix symbolic displacement in lay
Increase the fixup length to 4 for the 20 bit displacement. gas/ChangeLog: 2018-09-25 Andreas Krebbel <krebbel@linux.ibm.com> * config/tc-s390.c (md_apply_fix): Set fx_size to 4 for 20 bit displacements. * testsuite/gas/s390/s390.exp: Run new test. * testsuite/gas/s390/zarch-z990-symbol-lay.s: New test.
-rw-r--r--gas/config/tc-s390.c2
-rw-r--r--gas/testsuite/gas/s390/s390.exp1
-rw-r--r--gas/testsuite/gas/s390/zarch-z990-symbol-lay.l0
-rw-r--r--gas/testsuite/gas/s390/zarch-z990-symbol-lay.s6
4 files changed, 8 insertions, 1 deletions
diff --git a/gas/config/tc-s390.c b/gas/config/tc-s390.c
index 60de23f..b53e33a 100644
--- a/gas/config/tc-s390.c
+++ b/gas/config/tc-s390.c
@@ -2294,7 +2294,7 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
}
else if (operand->bits == 20 && operand->shift == 20)
{
- fixP->fx_size = 2;
+ fixP->fx_size = 4;
fixP->fx_where += 2;
fixP->fx_r_type = BFD_RELOC_390_20;
}
diff --git a/gas/testsuite/gas/s390/s390.exp b/gas/testsuite/gas/s390/s390.exp
index e6d0754..f0258ef 100644
--- a/gas/testsuite/gas/s390/s390.exp
+++ b/gas/testsuite/gas/s390/s390.exp
@@ -21,6 +21,7 @@ if [expr [istarget "s390-*-*"] || [istarget "s390x-*-*"]] then {
run_dump_test "zarch-z900" "{as -m64}"
run_dump_test "zarch-z990" "{as -m64} {as -march=z990}"
+ run_list_test "zarch-z990-symbol-lay" "-m64 -march=z990"
run_dump_test "zarch-z9-109" "{as -m64} {as -march=z9-109}"
run_list_test "zarch-z9-109-err" "-march=z9-109"
run_dump_test "zarch-z9-ec" "{as -m64} {as -march=z9-ec}"
diff --git a/gas/testsuite/gas/s390/zarch-z990-symbol-lay.l b/gas/testsuite/gas/s390/zarch-z990-symbol-lay.l
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/gas/testsuite/gas/s390/zarch-z990-symbol-lay.l
diff --git a/gas/testsuite/gas/s390/zarch-z990-symbol-lay.s b/gas/testsuite/gas/s390/zarch-z990-symbol-lay.s
new file mode 100644
index 0000000..97aa8ec
--- /dev/null
+++ b/gas/testsuite/gas/s390/zarch-z990-symbol-lay.s
@@ -0,0 +1,6 @@
+.text
+foo:
+ lay %r1,bar
+ .org 0x10000
+bar:
+ .long 42