# HG changeset patch # User Doug Simon # Date 1389264367 -3600 # Node ID 55a8ca3f49f76c424a3e71be31b3e899f95d5249 # Parent 29db3f666f8da2ae5f0dd81dc0a134019bd26d48# Parent 1335577dc50cfaf0c4940c0e71f5643a70cd81df Merge. diff -r 1335577dc50c -r 55a8ca3f49f7 graal/com.oracle.graal.asm.hsail/src/com/oracle/graal/asm/hsail/HSAILAssembler.java --- a/graal/com.oracle.graal.asm.hsail/src/com/oracle/graal/asm/hsail/HSAILAssembler.java Thu Jan 09 10:24:26 2014 +0100 +++ b/graal/com.oracle.graal.asm.hsail/src/com/oracle/graal/asm/hsail/HSAILAssembler.java Thu Jan 09 11:46:07 2014 +0100 @@ -273,7 +273,9 @@ */ public void emitCompare(Value src0, Value src1, String condition, boolean unordered, boolean isUnsignedCompare) { // Formulate the prefix of the instruction. - String prefix = "cmp_" + condition + (unordered ? "u" : "") + "_b1_" + (isUnsignedCompare ? getArgTypeForceUnsigned(src1) : getArgType(src1)); + // if unordered is true, it should be ignored unless the src type is f32 or f64 + String unorderedPrefix = (getArgType(src1).startsWith("f") && unordered ? "u" : ""); + String prefix = "cmp_" + condition + unorderedPrefix + "_b1_" + (isUnsignedCompare ? getArgTypeForceUnsigned(src1) : getArgType(src1)); // Generate a comment for debugging purposes String comment = (isConstant(src1) && (src1.getKind() == Kind.Object) && (asConstant(src1).asObject() == null) ? " // null test " : ""); // Emit the instruction. diff -r 1335577dc50c -r 55a8ca3f49f7 src/cpu/x86/vm/nativeInst_x86.hpp --- a/src/cpu/x86/vm/nativeInst_x86.hpp Thu Jan 09 10:24:26 2014 +0100 +++ b/src/cpu/x86/vm/nativeInst_x86.hpp Thu Jan 09 11:46:07 2014 +0100 @@ -574,10 +574,6 @@ return false; } } else { -#ifdef GRAAL - // Graal may allocate an arbitrary register for storing the polling address. - return true; -#else if (ubyte_at(0) == NativeTstRegMem::instruction_code_memXregl && ubyte_at(1) == 0x05) { // 00 rax 101 address fault = addr_at(6) + int_at(2); @@ -585,7 +581,6 @@ } else { return false; } -#endif } #else return ( ubyte_at(0) == NativeMovRegMem::instruction_code_mem2reg || diff -r 1335577dc50c -r 55a8ca3f49f7 src/cpu/x86/vm/relocInfo_x86.cpp --- a/src/cpu/x86/vm/relocInfo_x86.cpp Thu Jan 09 10:24:26 2014 +0100 +++ b/src/cpu/x86/vm/relocInfo_x86.cpp Thu Jan 09 11:46:07 2014 +0100 @@ -181,6 +181,9 @@ #ifdef _LP64 typedef Assembler::WhichOperand WhichOperand; WhichOperand which = (WhichOperand) format(); +#ifndef GRAAL + assert((which == Assembler::disp32_operand) == !Assembler::is_polling_page_far(), "format not set correctly"); +#endif if (which == Assembler::disp32_operand) { address orig_addr = old_addr_for(addr(), src, dest); NativeInstruction* oni = nativeInstruction_at(orig_addr);