Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(323)

Unified Diff: src/assembler_arm32.h

Issue 1136793002: Handle ARM "ret void" and function alignment with proper padding. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: note moved to cpp Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/assembler.h ('k') | src/assembler_ia32.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/assembler_arm32.h
diff --git a/src/assembler_arm32.h b/src/assembler_arm32.h
index 6c8a9580beb0305881641c5e21ec49704925b2b0..54eadec1bab35509c4d43ebe87a646580a7a78d1 100644
--- a/src/assembler_arm32.h
+++ b/src/assembler_arm32.h
@@ -42,29 +42,32 @@ public:
}
~AssemblerARM32() override = default;
- void alignFunction() override {
- llvm::report_fatal_error("Not yet implemented.");
- }
+ void alignFunction() override { llvm_unreachable("Not yet implemented."); }
SizeT getBundleAlignLog2Bytes() const override { return 4; }
+ const char *getNonExecPadDirective() const override { return ".p2alignl"; }
+
llvm::ArrayRef<uint8_t> getNonExecBundlePadding() const override {
- llvm::report_fatal_error("Not yet implemented.");
+ // 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);
}
void padWithNop(intptr_t Padding) override {
(void)Padding;
- llvm::report_fatal_error("Not yet implemented.");
+ llvm_unreachable("Not yet implemented.");
}
void BindCfgNodeLabel(SizeT NodeNumber) override {
(void)NodeNumber;
- llvm::report_fatal_error("Not yet implemented.");
+ llvm_unreachable("Not yet implemented.");
}
bool fixupIsPCRel(FixupKind Kind) const override {
(void)Kind;
- llvm::report_fatal_error("Not yet implemented.");
+ llvm_unreachable("Not yet implemented.");
}
};
« no previous file with comments | « src/assembler.h ('k') | src/assembler_ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698