Mercurial > hg > graal-compiler
comparison src/cpu/x86/vm/x86_64.ad @ 403:b744678d4d71
6752257: Use NOT instead of XOR -1 on x86
Summary: add match rule for xor -1
Reviewed-by: never, kvn
author | rasbold |
---|---|
date | Fri, 10 Oct 2008 09:47:56 -0700 |
parents | dc7f315e41f7 |
children | 4d9884b01ba6 |
comparison
equal
deleted
inserted
replaced
402:b4e0a161f551 | 403:b744678d4d71 |
---|---|
9307 opcode(0x33); | 9307 opcode(0x33); |
9308 ins_encode(REX_reg_reg(dst, src), OpcP, reg_reg(dst, src)); | 9308 ins_encode(REX_reg_reg(dst, src), OpcP, reg_reg(dst, src)); |
9309 ins_pipe(ialu_reg_reg); | 9309 ins_pipe(ialu_reg_reg); |
9310 %} | 9310 %} |
9311 | 9311 |
9312 // Xor Register with Immediate -1 | |
9313 instruct xorI_rReg_im1(rRegI dst, immI_M1 imm) %{ | |
9314 match(Set dst (XorI dst imm)); | |
9315 | |
9316 format %{ "not $dst" %} | |
9317 ins_encode %{ | |
9318 __ notl($dst$$Register); | |
9319 %} | |
9320 ins_pipe(ialu_reg); | |
9321 %} | |
9322 | |
9312 // Xor Register with Immediate | 9323 // Xor Register with Immediate |
9313 instruct xorI_rReg_imm(rRegI dst, immI src, rFlagsReg cr) | 9324 instruct xorI_rReg_imm(rRegI dst, immI src, rFlagsReg cr) |
9314 %{ | 9325 %{ |
9315 match(Set dst (XorI dst src)); | 9326 match(Set dst (XorI dst src)); |
9316 effect(KILL cr); | 9327 effect(KILL cr); |
9525 | 9536 |
9526 format %{ "xorq $dst, $src\t# long" %} | 9537 format %{ "xorq $dst, $src\t# long" %} |
9527 opcode(0x33); | 9538 opcode(0x33); |
9528 ins_encode(REX_reg_reg_wide(dst, src), OpcP, reg_reg(dst, src)); | 9539 ins_encode(REX_reg_reg_wide(dst, src), OpcP, reg_reg(dst, src)); |
9529 ins_pipe(ialu_reg_reg); | 9540 ins_pipe(ialu_reg_reg); |
9541 %} | |
9542 | |
9543 // Xor Register with Immediate -1 | |
9544 instruct xorL_rReg_im1(rRegL dst, immL_M1 imm) %{ | |
9545 match(Set dst (XorL dst imm)); | |
9546 | |
9547 format %{ "notq $dst" %} | |
9548 ins_encode %{ | |
9549 __ notq($dst$$Register); | |
9550 %} | |
9551 ins_pipe(ialu_reg); | |
9530 %} | 9552 %} |
9531 | 9553 |
9532 // Xor Register with Immediate | 9554 // Xor Register with Immediate |
9533 instruct xorL_rReg_imm(rRegL dst, immL32 src, rFlagsReg cr) | 9555 instruct xorL_rReg_imm(rRegL dst, immL32 src, rFlagsReg cr) |
9534 %{ | 9556 %{ |