[lld] r350853 - TrapInstr must be 4 bytes long. Currently we write two zeros on every two bytes.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 10 09:45:56 PST 2019


Author: ruiu
Date: Thu Jan 10 09:45:56 2019
New Revision: 350853

URL: http://llvm.org/viewvc/llvm-project?rev=350853&view=rev
Log:
TrapInstr must be 4 bytes long. Currently we write two zeros on every two bytes.

Modified:
    lld/trunk/ELF/Arch/MSP430.cpp
    lld/trunk/test/ELF/msp430.s

Modified: lld/trunk/ELF/Arch/MSP430.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Arch/MSP430.cpp?rev=350853&r1=350852&r2=350853&view=diff
==============================================================================
--- lld/trunk/ELF/Arch/MSP430.cpp (original)
+++ lld/trunk/ELF/Arch/MSP430.cpp Thu Jan 10 09:45:56 2019
@@ -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,

Modified: lld/trunk/test/ELF/msp430.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/msp430.s?rev=350853&r1=350852&r2=350853&view=diff
==============================================================================
--- lld/trunk/test/ELF/msp430.s (original)
+++ lld/trunk/test/ELF/msp430.s Thu Jan 10 09:45:56 2019
@@ -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




More information about the llvm-commits mailing list