Commit 7d59513d by John Porto

Subzero. ARM32. Enables obj output.

This CL implements two little pieces of the lowering that are needed for --filetype=obj support in arm. With this change, spec2k builds and verifies with --filetype=obj BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4076 R=kschimpf@google.com, stichnot@chromium.org Review URL: https://codereview.chromium.org/1651603003 .
parent 4a659477
...@@ -478,7 +478,7 @@ endif ...@@ -478,7 +478,7 @@ endif
ifeq ($(TARGET),arm32) ifeq ($(TARGET),arm32)
TARGETFLAG=arm32 TARGETFLAG=arm32
SETUP=SetupGccArmOpt SETUP=SetupGccArmOpt
SPEC := -O2 --filetype=asm SPEC := -O2 --filetype=obj
endif endif
SPECFLAGS := SPECFLAGS :=
SPECBUILDONLY := false SPECBUILDONLY := false
......
...@@ -6437,9 +6437,11 @@ void TargetDataARM32::lowerConstants() { ...@@ -6437,9 +6437,11 @@ void TargetDataARM32::lowerConstants() {
if (Ctx->getFlags().getDisableTranslation()) if (Ctx->getFlags().getDisableTranslation())
return; return;
switch (Ctx->getFlags().getOutFileType()) { switch (Ctx->getFlags().getOutFileType()) {
case FT_Elf: case FT_Elf: {
UnimplementedError(Ctx->getFlags()); ELFObjectWriter *Writer = Ctx->getObjectWriter();
break; Writer->writeConstantPool<ConstantFloat>(IceType_f32);
Writer->writeConstantPool<ConstantDouble>(IceType_f64);
} break;
case FT_Asm: case FT_Asm:
case FT_Iasm: { case FT_Iasm: {
OstreamLocker _(Ctx); OstreamLocker _(Ctx);
...@@ -6455,7 +6457,9 @@ void TargetDataARM32::lowerJumpTables() { ...@@ -6455,7 +6457,9 @@ void TargetDataARM32::lowerJumpTables() {
return; return;
switch (Ctx->getFlags().getOutFileType()) { switch (Ctx->getFlags().getOutFileType()) {
case FT_Elf: case FT_Elf:
UnimplementedError(Ctx->getFlags()); if (!Ctx->getJumpTables().empty()) {
llvm::report_fatal_error("ARM32 does not support jump tables yet.");
}
break; break;
case FT_Asm: case FT_Asm:
// Already emitted from Cfg // Already emitted from Cfg
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment