2919 NOT_LP64(assert(VM_Version::supports_sse2(), "")); 2920 emit_simd_arith(0x5C, dst, src, VEX_SIMD_F2); 2921 } 2922 2923 void Assembler::subss(XMMRegister dst, XMMRegister src) { 2924 NOT_LP64(assert(VM_Version::supports_sse(), "")); 2925 emit_simd_arith(0x5C, dst, src, VEX_SIMD_F3); 2926 } 2927 2928 void Assembler::subss(XMMRegister dst, Address src) { 2929 NOT_LP64(assert(VM_Version::supports_sse(), "")); 2930 emit_simd_arith(0x5C, dst, src, VEX_SIMD_F3); 2931 } 2932 2933 void Assembler::testb(Register dst, int imm8) { 2934 NOT_LP64(assert(dst->has_byte_register(), "must have byte register")); 2935 (void) prefix_and_encode(dst->encoding(), true); 2936 emit_arith_b(0xF6, 0xC0, dst, imm8); 2937 } 2938 2939 void Assembler::testl(Register dst, int32_t imm32) { 2940 // not using emit_arith because test 2941 // doesn't support sign-extension of 2942 // 8bit operands 2943 int encode = dst->encoding(); 2944 if (encode == 0) { 2945 emit_int8((unsigned char)0xA9); 2946 } else { 2947 encode = prefix_and_encode(encode); 2948 emit_int8((unsigned char)0xF7); 2949 emit_int8((unsigned char)(0xC0 | encode)); 2950 } 2951 emit_int32(imm32); 2952 } 2953 2954 void Assembler::testl(Register dst, Register src) { 2955 (void) prefix_and_encode(dst->encoding(), src->encoding()); 2956 emit_arith(0x85, 0xC0, dst, src); 2957 } 2958 | 2919 NOT_LP64(assert(VM_Version::supports_sse2(), "")); 2920 emit_simd_arith(0x5C, dst, src, VEX_SIMD_F2); 2921 } 2922 2923 void Assembler::subss(XMMRegister dst, XMMRegister src) { 2924 NOT_LP64(assert(VM_Version::supports_sse(), "")); 2925 emit_simd_arith(0x5C, dst, src, VEX_SIMD_F3); 2926 } 2927 2928 void Assembler::subss(XMMRegister dst, Address src) { 2929 NOT_LP64(assert(VM_Version::supports_sse(), "")); 2930 emit_simd_arith(0x5C, dst, src, VEX_SIMD_F3); 2931 } 2932 2933 void Assembler::testb(Register dst, int imm8) { 2934 NOT_LP64(assert(dst->has_byte_register(), "must have byte register")); 2935 (void) prefix_and_encode(dst->encoding(), true); 2936 emit_arith_b(0xF6, 0xC0, dst, imm8); 2937 } 2938 2939 void Assembler::testb(Address dst, int imm8) { 2940 InstructionMark im(this); 2941 prefix(dst); 2942 emit_int8((unsigned char)0xF6); 2943 emit_operand(rax, dst, 1); 2944 emit_int8(imm8); 2945 } 2946 2947 void Assembler::testl(Register dst, int32_t imm32) { 2948 // not using emit_arith because test 2949 // doesn't support sign-extension of 2950 // 8bit operands 2951 int encode = dst->encoding(); 2952 if (encode == 0) { 2953 emit_int8((unsigned char)0xA9); 2954 } else { 2955 encode = prefix_and_encode(encode); 2956 emit_int8((unsigned char)0xF7); 2957 emit_int8((unsigned char)(0xC0 | encode)); 2958 } 2959 emit_int32(imm32); 2960 } 2961 2962 void Assembler::testl(Register dst, Register src) { 2963 (void) prefix_and_encode(dst->encoding(), src->encoding()); 2964 emit_arith(0x85, 0xC0, dst, src); 2965 } 2966 |