diff options
| -rw-r--r-- | compiler/utils/x86/assembler_x86.cc | 8 | ||||
| -rw-r--r-- | compiler/utils/x86/assembler_x86.h | 1 | ||||
| -rw-r--r-- | compiler/utils/x86/assembler_x86_test.cc | 6 | ||||
| -rw-r--r-- | compiler/utils/x86_64/assembler_x86_64.cc | 10 | ||||
| -rw-r--r-- | compiler/utils/x86_64/assembler_x86_64.h | 1 | ||||
| -rw-r--r-- | compiler/utils/x86_64/assembler_x86_64_test.cc | 7 | ||||
| -rwxr-xr-x | test/run-test | 11 | ||||
| -rw-r--r-- | tools/libcore_failures.txt | 6 |
8 files changed, 40 insertions, 10 deletions
diff --git a/compiler/utils/x86/assembler_x86.cc b/compiler/utils/x86/assembler_x86.cc index 2203646e77..84cdb7d4d3 100644 --- a/compiler/utils/x86/assembler_x86.cc +++ b/compiler/utils/x86/assembler_x86.cc @@ -1030,6 +1030,14 @@ void X86Assembler::xchgl(Register reg, const Address& address) { } +void X86Assembler::cmpb(const Address& address, const Immediate& imm) { + AssemblerBuffer::EnsureCapacity ensured(&buffer_); + EmitUint8(0x80); + EmitOperand(7, address); + EmitUint8(imm.value() & 0xFF); +} + + void X86Assembler::cmpw(const Address& address, const Immediate& imm) { AssemblerBuffer::EnsureCapacity ensured(&buffer_); EmitUint8(0x66); diff --git a/compiler/utils/x86/assembler_x86.h b/compiler/utils/x86/assembler_x86.h index 8567ad2a17..bc46e9f7c9 100644 --- a/compiler/utils/x86/assembler_x86.h +++ b/compiler/utils/x86/assembler_x86.h @@ -479,6 +479,7 @@ class X86Assembler FINAL : public Assembler { void xchgl(Register dst, Register src); void xchgl(Register reg, const Address& address); + void cmpb(const Address& address, const Immediate& imm); void cmpw(const Address& address, const Immediate& imm); void cmpl(Register reg, const Immediate& imm); diff --git a/compiler/utils/x86/assembler_x86_test.cc b/compiler/utils/x86/assembler_x86_test.cc index 1d1df6e447..28043c9380 100644 --- a/compiler/utils/x86/assembler_x86_test.cc +++ b/compiler/utils/x86/assembler_x86_test.cc @@ -389,4 +389,10 @@ TEST_F(AssemblerX86Test, NearLabel) { DriverStr(expected, "near_label"); } +TEST_F(AssemblerX86Test, Cmpb) { + GetAssembler()->cmpb(x86::Address(x86::EDI, 128), x86::Immediate(0)); + const char* expected = "cmpb $0, 128(%EDI)\n"; + DriverStr(expected, "cmpb"); +} + } // namespace art diff --git a/compiler/utils/x86_64/assembler_x86_64.cc b/compiler/utils/x86_64/assembler_x86_64.cc index 32eb4a37bf..5e7b587e40 100644 --- a/compiler/utils/x86_64/assembler_x86_64.cc +++ b/compiler/utils/x86_64/assembler_x86_64.cc @@ -1224,6 +1224,16 @@ void X86_64Assembler::xchgl(CpuRegister reg, const Address& address) { } +void X86_64Assembler::cmpb(const Address& address, const Immediate& imm) { + AssemblerBuffer::EnsureCapacity ensured(&buffer_); + CHECK(imm.is_int32()); + EmitOptionalRex32(address); + EmitUint8(0x80); + EmitOperand(7, address); + EmitUint8(imm.value() & 0xFF); +} + + void X86_64Assembler::cmpw(const Address& address, const Immediate& imm) { AssemblerBuffer::EnsureCapacity ensured(&buffer_); CHECK(imm.is_int32()); diff --git a/compiler/utils/x86_64/assembler_x86_64.h b/compiler/utils/x86_64/assembler_x86_64.h index 92c7d0ab99..720a402b5f 100644 --- a/compiler/utils/x86_64/assembler_x86_64.h +++ b/compiler/utils/x86_64/assembler_x86_64.h @@ -506,6 +506,7 @@ class X86_64Assembler FINAL : public Assembler { void xchgq(CpuRegister dst, CpuRegister src); void xchgl(CpuRegister reg, const Address& address); + void cmpb(const Address& address, const Immediate& imm); void cmpw(const Address& address, const Immediate& imm); void cmpl(CpuRegister reg, const Immediate& imm); diff --git a/compiler/utils/x86_64/assembler_x86_64_test.cc b/compiler/utils/x86_64/assembler_x86_64_test.cc index afe9207eb1..9dccc9f21f 100644 --- a/compiler/utils/x86_64/assembler_x86_64_test.cc +++ b/compiler/utils/x86_64/assembler_x86_64_test.cc @@ -1637,4 +1637,11 @@ TEST_F(AssemblerX86_64Test, Repecmpsq) { DriverStr(expected, "Repecmpsq"); } +TEST_F(AssemblerX86_64Test, Cmpb) { + GetAssembler()->cmpb(x86_64::Address(x86_64::CpuRegister(x86_64::RDI), 128), + x86_64::Immediate(0)); + const char* expected = "cmpb $0, 128(%RDI)\n"; + DriverStr(expected, "cmpb"); +} + } // namespace art diff --git a/test/run-test b/test/run-test index 047e3fb606..2710ea32b1 100755 --- a/test/run-test +++ b/test/run-test @@ -122,10 +122,12 @@ never_clean="no" have_dex2oat="yes" have_patchoat="yes" have_image="yes" -image_suffix="" pic_image_suffix="" multi_image_suffix="" android_root="/system" +# By default we will use optimizing. +image_args="" +image_suffix="-optimizing" while true; do if [ "x$1" = "x--host" ]; then @@ -249,18 +251,18 @@ while true; do image_suffix="-interpreter" shift elif [ "x$1" = "x--jit" ]; then - run_args="${run_args} --jit" + image_args="--jit" image_suffix="-jit" shift elif [ "x$1" = "x--optimizing" ]; then - run_args="${run_args} -Xcompiler-option --compiler-backend=Optimizing" + image_args="-Xcompiler-option --compiler-backend=Optimizing" image_suffix="-optimizing" shift elif [ "x$1" = "x--no-verify" ]; then run_args="${run_args} --no-verify" shift elif [ "x$1" = "x--verify-soft-fail" ]; then - run_args="${run_args} --verify-soft-fail" + image_args="--verify-soft-fail" image_suffix="-interp-ac" shift elif [ "x$1" = "x--no-optimize" ]; then @@ -349,6 +351,7 @@ while true; do fi done +run_args="${run_args} ${image_args}" # Allocate file descriptor real_stderr and redirect it to the shell's error # output (fd 2). if [ ${BASH_VERSINFO[1]} -ge 4 ] && [ ${BASH_VERSINFO[2]} -ge 1 ]; then diff --git a/tools/libcore_failures.txt b/tools/libcore_failures.txt index dd2cc3140f..f25fb98c4d 100644 --- a/tools/libcore_failures.txt +++ b/tools/libcore_failures.txt @@ -253,11 +253,5 @@ names: ["jsr166.CollectionTest#testEmptyMeansEmpty", "jsr166.Collection8Test#testForEach", "jsr166.Collection8Test#testForEachConcurrentStressTest"] -}, -{ - description: "Unclear why this started to fail", - result: EXEC_FAILED, - bug: 28574453, - names: [ "org.apache.harmony.tests.javax.security.cert.X509CertificateTest#testVerifyPublicKey" ] } ] |