summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2019-01-10 17:45:56 +0000
committerRui Ueyama <ruiu@google.com>2019-01-10 17:45:56 +0000
commitb41a6966e06674104c2307e01085ec2f4d885fe0 (patch)
treec9edd4f627e9b53c555a50aa1101314b88e24aeb
parent8c48705a19753ea10a99fd0223c5eee75de776cb (diff)
downloadbcm5719-llvm-b41a6966e06674104c2307e01085ec2f4d885fe0.tar.gz
bcm5719-llvm-b41a6966e06674104c2307e01085ec2f4d885fe0.zip
TrapInstr must be 4 bytes long. Currently we write two zeros on every two bytes.
llvm-svn: 350853
-rw-r--r--lld/ELF/Arch/MSP430.cpp2
-rw-r--r--lld/test/ELF/msp430.s3
2 files changed, 4 insertions, 1 deletions
diff --git a/lld/ELF/Arch/MSP430.cpp b/lld/ELF/Arch/MSP430.cpp
index 073283374f8..fe0c0fe64da 100644
--- a/lld/ELF/Arch/MSP430.cpp
+++ b/lld/ELF/Arch/MSP430.cpp
@@ -42,7 +42,7 @@ public:
MSP430::MSP430() {
// mov.b #0, r3
- TrapInstr = {0x43, 0x43};
+ TrapInstr = {0x43, 0x43, 0x43, 0x43};
}
RelExpr MSP430::getRelExpr(RelType Type, const Symbol &S,
diff --git a/lld/test/ELF/msp430.s b/lld/test/ELF/msp430.s
index 2d063696282..83548fdf4ce 100644
--- a/lld/test/ELF/msp430.s
+++ b/lld/test/ELF/msp430.s
@@ -38,3 +38,6 @@ foo:
; CHECK: Contents of section .data:
; CHECK-NEXT: 2000 21008000 800000
+
+; RUN: od -x %t3 | FileCheck -check-prefix=TRAP %s
+; TRAP: 4343 4343 4343 4343 4343 4343 4343 4343
OpenPOWER on IntegriCloud