| Index: src/IceAssemblerARM32.h
|
| diff --git a/src/IceAssemblerARM32.h b/src/IceAssemblerARM32.h
|
| index 08619b4632e4b44f9ae49268fbc8d9329949fe42..c4a8d51aca81d9116f4afcc5e3953f427f75f63c 100644
|
| --- a/src/IceAssemblerARM32.h
|
| +++ b/src/IceAssemblerARM32.h
|
| @@ -114,12 +114,10 @@ public:
|
| void alignFunction() override {
|
| const SizeT Align = 1 << getBundleAlignLog2Bytes();
|
| SizeT BytesNeeded = Utils::OffsetToAlignment(Buffer.getPosition(), Align);
|
| - constexpr IValueT UndefinedInst = 0xe7fedef0; // udf #60896
|
| constexpr SizeT InstSize = sizeof(IValueT);
|
| assert(BytesNeeded % InstARM32::InstSize == 0);
|
| while (BytesNeeded > 0) {
|
| - AssemblerBuffer::EnsureCapacity ensured(&Buffer);
|
| - emitInst(UndefinedInst);
|
| + trap();
|
| BytesNeeded -= InstSize;
|
| }
|
| }
|
| @@ -128,12 +126,7 @@ public:
|
|
|
| const char *getAlignDirective() const override { return ".p2alignl"; }
|
|
|
| - llvm::ArrayRef<uint8_t> getNonExecBundlePadding() const override {
|
| - // Use a particular UDF encoding -- TRAPNaCl in LLVM: 0xE7FEDEF0
|
| - // http://llvm.org/viewvc/llvm-project?view=revision&revision=173943
|
| - static const uint8_t Padding[] = {0xE7, 0xFE, 0xDE, 0xF0};
|
| - return llvm::ArrayRef<uint8_t>(Padding, 4);
|
| - }
|
| + llvm::ArrayRef<uint8_t> getNonExecBundlePadding() const override;
|
|
|
| void padWithNop(intptr_t Padding) override;
|
|
|
| @@ -307,6 +300,8 @@ public:
|
| // Implements sxtb/sxth depending on type of OpSrc0.
|
| void sxt(const Operand *OpRd, const Operand *OpSrc0, CondARM32::Cond Cond);
|
|
|
| + void trap();
|
| +
|
| void tst(const Operand *OpRn, const Operand *OpSrc1, CondARM32::Cond Cond);
|
|
|
| void udiv(const Operand *OpRd, const Operand *OpRn, const Operand *OpSrc1,
|
| @@ -333,6 +328,8 @@ private:
|
| // Number of bytes emitted by InstARM32::emit() methods, when run inside
|
| // InstARM32::emitUsingTextFixup().
|
| size_t EmitTextSize = 0;
|
| + // Trap instruction (defined in little-endian byte order).
|
| + static const uint8_t TrapInst[];
|
|
|
| // Load/store multiple addressing mode.
|
| enum BlockAddressMode {
|
|
|