"inserted. These binaries are not executable."),
cl::init(false));
-cl::opt<bool> AllowUnsafeIas(
- "unsafe-ias",
- cl::desc("Convert (potentially broken) instructions to bytes in "
- "integrated assembler."),
- cl::init(false));
-
// This is currently needed by crosstest.py.
cl::opt<bool> AllowUninitializedGlobals(
"allow-uninitialized-globals",
OutFlags.AllowErrorRecovery = false;
OutFlags.AllowExternDefinedSymbols = false;
OutFlags.AllowIacaMarks = false;
- OutFlags.AllowUnsafeIas = false;
OutFlags.AllowUninitializedGlobals = false;
OutFlags.DataSections = false;
OutFlags.DecorateAsm = false;
OutFlags.setDisableInternal(::DisableInternal);
OutFlags.setDisableIRGeneration(::DisableIRGeneration);
OutFlags.setDisableTranslation(::DisableTranslation);
- OutFlags.setAllowUnsafeIas(::AllowUnsafeIas);
OutFlags.setDumpStats(::DumpStats);
OutFlags.setEnableBlockProfile(::EnableBlockProfile);
OutFlags.setForceMemIntrinOpt(::ForceMemIntrinOpt);
bool getAllowIacaMarks() const { return AllowIacaMarks; }
void setAllowIacaMarks(bool NewValue) { AllowIacaMarks = NewValue; }
- bool getAllowUnsafeIas() const { return AllowUnsafeIas; }
- void setAllowUnsafeIas(bool NewValue) { AllowUnsafeIas = NewValue; }
-
bool getAllowUninitializedGlobals() const {
return AllowUninitializedGlobals;
}
bool AllowExternDefinedSymbols;
bool AllowIacaMarks;
bool AllowUninitializedGlobals;
- // TODO(kschimpf): This is a temporary flag. Nuke this once the ARM integrated
- // assembler is working.
- bool AllowUnsafeIas;
bool DataSections;
bool DecorateAsm;
bool DisableHybridAssembly;
return Asm->setNeedsTextFixup();
return Asm->str(Src0, Dest, getPredicate(), Func->getTarget());
}
- Asm->setNeedsTextFixup();
}
void InstARM32Mov::emit(const Cfg *Func) const {
}
void InstARM32Mov::emitIAS(const Cfg *Func) const {
- if (!Func->getContext()->getFlags().getAllowUnsafeIas())
- return emitUsingTextFixup(Func);
assert(!(isMultiDest() && isMultiSource()) && "Invalid vmov type.");
auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>();
- if (!(isMultiDest() || isMultiSource())) {
+ if (!(isMultiDest() || isMultiSource()))
// Must be single source/dest.
emitIASSingleDestSingleSource(Func);
- }
+ else
+ Asm->setNeedsTextFixup();
if (Asm->needsTextFixup())
emitUsingTextFixup(Func);
}
; RUN: --args -O2 | FileCheck %s --check-prefix=DIS
; Compile using integrated assembler.
-; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -O2 -unsafe-ias \
+; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -O2 \
; RUN: | FileCheck %s --check-prefix=IASM
; Show bytes in assembled integrated code.
; RUN: %p2i --filetype=iasm -i %s --target=arm32 --assemble --disassemble \
-; RUN: --args -O2 -unsafe-ias | FileCheck %s --check-prefix=DIS
+; RUN: --args -O2 | FileCheck %s --check-prefix=DIS
define internal i32 @AllocBigAlign() {
%addr = alloca i8, align 32
; RUN: --args -Om1 | FileCheck %s --check-prefix=DIS
; Compile using integrated assembler.
-; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -Om1 -unsafe-ias \
+; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -Om1 \
; RUN: | FileCheck %s --check-prefix=IASM
; Show bytes in assembled integrated code.
; RUN: %p2i --filetype=iasm -i %s --target=arm32 --assemble --disassemble \
-; RUN: --args -Om1 -unsafe-ias | FileCheck %s --check-prefix=DIS
+; RUN: --args -Om1 | FileCheck %s --check-prefix=DIS
; REQUIRES: allow_dump
; RUN: --args -Om1 | FileCheck %s --check-prefix=DIS
; Compile using integrated assembler.
-; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -Om1 -unsafe-ias \
+; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -Om1 \
; RUN: | FileCheck %s --check-prefix=IASM
; Show bytes in assembled integrated code.
; RUN: %p2i --filetype=iasm -i %s --target=arm32 --assemble --disassemble \
-; RUN: --args -Om1 -unsafe-ias | FileCheck %s --check-prefix=DIS
+; RUN: --args -Om1 | FileCheck %s --check-prefix=DIS
define internal i32 @add1ToR0(i32 %p) {
%v = add i32 %p, 1
; RUN: --args -Om1 --test-stack-extra 4084 | FileCheck %s --check-prefix=DIS
; Compile using integrated assembler.
-; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -Om1 -unsafe-ias \
+; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -Om1 \
; RUN: --test-stack-extra 4084 | FileCheck %s --check-prefix=IASM
; Show bytes in assembled integrated code.
; RUN: %p2i --filetype=iasm -i %s --target=arm32 --assemble --disassemble \
-; RUN: --args -Om1 -unsafe-ias --test-stack-extra 4084 \
+; RUN: --args -Om1 --test-stack-extra 4084 \
; RUN: | FileCheck %s --check-prefix=DIS
define internal i32 @foo(i32 %x) {
; RUN: --args -O2 | FileCheck %s --check-prefix=DIS
; Compile using integrated assembler.
-; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -O2 -unsafe-ias \
+; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -O2 \
; RUN: | FileCheck %s --check-prefix=IASM
; Show bytes in assembled integrated code.
; RUN: %p2i --filetype=iasm -i %s --target=arm32 --assemble --disassemble \
-; RUN: --args -O2 -unsafe-ias | FileCheck %s --check-prefix=DIS
+; RUN: --args -O2 | FileCheck %s --check-prefix=DIS
define internal i32 @Imm1() {
ret i32 1
; RUN: --args -O2 | FileCheck %s --check-prefix=DIS
; Compile using integrated assembler.
-; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -O2 -unsafe-ias \
+; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -O2 \
; RUN: | FileCheck %s --check-prefix=IASM
; Show bytes in assembled integrated code.
; RUN: %p2i --filetype=iasm -i %s --target=arm32 --assemble --disassemble \
-; RUN: --args -O2 -unsafe-ias | FileCheck %s --check-prefix=DIS
+; RUN: --args -O2 | FileCheck %s --check-prefix=DIS
define internal i32 @MulTwoRegs(i32 %a, i32 %b) {
%v = mul i32 %a, %b
; RUN: --args -O2 -allow-extern | FileCheck %s --check-prefix=DIS
; Compile using integrated assembler.
-; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -O2 -unsafe-ias \
+; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -O2 \
; RUN: -allow-extern | FileCheck %s --check-prefix=IASM
; Show bytes in assembled integrated code.
; RUN: %p2i --filetype=iasm -i %s --target=arm32 --assemble --disassemble \
-; RUN: --args -O2 -unsafe-ias -allow-extern | FileCheck %s --check-prefix=DIS
+; RUN: --args -O2 -allow-extern | FileCheck %s --check-prefix=DIS
declare external void @DoSomething()
; Compile using integrated assembler.
; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -Om1 \
-; RUN: -unsafe-ias | FileCheck %s --check-prefix=IASM
+; RUN: | FileCheck %s --check-prefix=IASM
; Show bytes in assembled integrated code.
; RUN: %p2i --filetype=iasm -i %s --target=arm32 --assemble --disassemble \
-; RUN: --args -Om1 -unsafe-ias | FileCheck %s --check-prefix=DIS
+; RUN: --args -Om1 | FileCheck %s --check-prefix=DIS
define internal void @test_vla_in_loop(i32 %n) {
; ASM-LABEL: test_vla_in_loop:
; ASM-NEXT: mov r0, r1
; DIS-NEXT: 10: e1a00001
-; IASM-NEXT: mov r0, r1
+; IASM-NEXT: .byte 0x1
+; IASM-NEXT: .byte 0x0
+; IASM-NEXT: .byte 0xa0
+; IASM-NEXT: .byte 0xe1
+
; ASM-NEXT: bx lr
; DIS-NEXT: 14: e12fff1e