Commit 659cc4f2 by Jim Stichnoth

Subzero: Fix MINIMAL build issues.

BUG= none R=kschimpf@google.com Review URL: https://codereview.chromium.org/1407263005 .
parent d981025a
...@@ -128,6 +128,9 @@ DecodedResult decodeOperand(const Operand *Opnd, uint32_t &Value) { ...@@ -128,6 +128,9 @@ DecodedResult decodeOperand(const Operand *Opnd, uint32_t &Value) {
const uint32_t Immed8 = FlexImm->getImm(); const uint32_t Immed8 = FlexImm->getImm();
const uint32_t Rotate = FlexImm->getRotateAmt(); const uint32_t Rotate = FlexImm->getRotateAmt();
assert((Rotate < (1 << kRotateBits)) && (Immed8 < (1 << kImmed8Bits))); assert((Rotate < (1 << kRotateBits)) && (Immed8 < (1 << kImmed8Bits)));
// TODO(kschimpf): Remove void casts when MINIMAL build allows.
(void) kRotateBits;
(void) kImmed8Bits;
Value = (Rotate << kRotateShift) | (Immed8 << kImmed8Shift); Value = (Rotate << kRotateShift) | (Immed8 << kImmed8Shift);
return DecodedAsRotatedImm8; return DecodedAsRotatedImm8;
} }
...@@ -202,6 +205,8 @@ void ARM32::AssemblerARM32::emitType01(CondARM32::Cond Cond, uint32_t Type, ...@@ -202,6 +205,8 @@ void ARM32::AssemblerARM32::emitType01(CondARM32::Cond Cond, uint32_t Type,
uint32_t Opcode, bool SetCc, uint32_t Rn, uint32_t Opcode, bool SetCc, uint32_t Rn,
uint32_t Rd, uint32_t Imm12) { uint32_t Rd, uint32_t Imm12) {
assert(isGPRRegisterDefined(Rd)); assert(isGPRRegisterDefined(Rd));
// TODO(kschimpf): Remove void cast when MINIMAL build allows.
(void) isGPRRegisterDefined(Rd);
assert(Cond != CondARM32::kNone); assert(Cond != CondARM32::kNone);
AssemblerBuffer::EnsureCapacity ensured(&Buffer); AssemblerBuffer::EnsureCapacity ensured(&Buffer);
const uint32_t Encoding = (encodeCondition(Cond) << kConditionShift) | const uint32_t Encoding = (encodeCondition(Cond) << kConditionShift) |
...@@ -264,6 +269,8 @@ void ARM32::AssemblerARM32::bx(RegARM32::GPRRegister Rm, CondARM32::Cond Cond) { ...@@ -264,6 +269,8 @@ void ARM32::AssemblerARM32::bx(RegARM32::GPRRegister Rm, CondARM32::Cond Cond) {
// cccc000100101111111111110001mmmm where mmmm=rm and cccc=Cond. // cccc000100101111111111110001mmmm where mmmm=rm and cccc=Cond.
// (ARM section A8.8.27, encoding A1). // (ARM section A8.8.27, encoding A1).
assert(isGPRRegisterDefined(Rm)); assert(isGPRRegisterDefined(Rm));
// TODO(kschimpf): Remove void cast when MINIMAL build allows.
(void) isGPRRegisterDefined(Rm);
assert(isConditionDefined(Cond)); assert(isConditionDefined(Cond));
AssemblerBuffer::EnsureCapacity ensured(&Buffer); AssemblerBuffer::EnsureCapacity ensured(&Buffer);
const uint32_t Encoding = (encodeCondition(Cond) << kConditionShift) | B24 | const uint32_t Encoding = (encodeCondition(Cond) << kConditionShift) | B24 |
......
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
; NOTE: We use -O2 to get rid of memory stores. ; NOTE: We use -O2 to get rid of memory stores.
; REQUIRES: allow_dump
; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -O2 \ ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -O2 \
; RUN: | FileCheck %s --check-prefix=ASM ; RUN: | FileCheck %s --check-prefix=ASM
; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -O2 \ ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -O2 \
......
; Show that we can handle variable (i.e. stack) spills. ; Show that we can handle variable (i.e. stack) spills.
; REQUIRES: allow_dump
; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -Om1 \ ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -Om1 \
; RUN: | FileCheck %s --check-prefix=ASM ; RUN: | FileCheck %s --check-prefix=ASM
; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -Om1 \ ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -Om1 \
......
; Show that we know how to translate move (immediate) ARM instruction. ; Show that we know how to translate move (immediate) ARM instruction.
; REQUIRES: allow_dump
; RUN: %p2i --filetype=asm -i %s --target=arm32 \ ; RUN: %p2i --filetype=asm -i %s --target=arm32 \
; RUN: | FileCheck %s --check-prefix=ASM ; RUN: | FileCheck %s --check-prefix=ASM
; RUN: %p2i --filetype=iasm -i %s --target=arm32 \ ; RUN: %p2i --filetype=iasm -i %s --target=arm32 \
......
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
; NOTE: We use -O2 to get rid of memory stores. ; NOTE: We use -O2 to get rid of memory stores.
; REQUIRES: allow_dump
; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -O2 \ ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -O2 \
; RUN: | FileCheck %s --check-prefix=ASM ; RUN: | FileCheck %s --check-prefix=ASM
; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -O2 \ ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -O2 \
......
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