src/cpu/x86/vm/x86_64.ad
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File
*** old/src/cpu/x86/vm/x86_64.ad	Sat Oct 20 02:54:22 2012
--- new/src/cpu/x86/vm/x86_64.ad	Sat Oct 20 02:54:22 2012

*** 4927,4936 **** --- 4927,4951 ---- %} ins_pipe(ialu_reg_mem); %} + // Load Byte (8 bit signed) with a 8-bit mask into Long Register + instruct loadB2L_immI8(rRegL dst, memory mem, immI8 mask, rFlagsReg cr) %{ + match(Set dst (ConvI2L (AndI (LoadB mem) mask))); + effect(KILL cr); + + format %{ "movzbq $dst, $mem\t# byte & 8-bit mask -> long\n\t" + "andl $dst, $mask" %} + ins_encode %{ + Register Rdst = $dst$$Register; + __ movzbq(Rdst, $mem$$Address); + __ andl(Rdst, $mask$$constant); + %} + ins_pipe(ialu_reg_mem); + %} + // Load Unsigned Byte (8 bit UNsigned) instruct loadUB(rRegI dst, memory mem) %{ match(Set dst (LoadUB mem));
*** 5014,5023 **** --- 5029,5064 ---- %} ins_pipe(ialu_reg_mem); %} + // Load Short (16 bit signed) with mask 0xFF into Long Register + instruct loadS2L_immI_255(rRegL dst, memory mem, immI_255 mask) %{ + match(Set dst (ConvI2L (AndI (LoadS mem) mask))); + + format %{ "movzbq $dst, $mem\t# short & 0xFF -> long" %} + ins_encode %{ + __ movzbq($dst$$Register, $mem$$Address); + %} + ins_pipe(ialu_reg_mem); + %} + + // Load Short (16 bit signed) with mask into Long Register + instruct loadS2L_immI16(rRegL dst, memory mem, immI16 mask, rFlagsReg cr) %{ + match(Set dst (ConvI2L (AndI (LoadS mem) mask))); + effect(KILL cr); + + format %{ "movzwq $dst, $mem\t# short & 16-bit mask -> long\n\t" + "andl $dst, $mask" %} + ins_encode %{ + Register Rdst = $dst$$Register; + __ movzwq(Rdst, $mem$$Address); + __ andl(Rdst, $mask$$constant); + %} + ins_pipe(ialu_reg_mem); + %} + // Load Unsigned Short/Char (16 bit UNsigned) instruct loadUS(rRegI dst, memory mem) %{ match(Set dst (LoadUS mem));
*** 5029,5038 **** --- 5070,5094 ---- %} ins_pipe(ialu_reg_mem); %} + // Load Unsigned Short/Char (16 bit UNsigned) shifting left & right by 16-bit + instruct loadUS_shiftLR_16(rRegI dst, memory mem, immI_16 sixteen) + %{ + match(Set dst (RShiftI (LShiftI (LoadUS mem) sixteen) sixteen)); + + ins_cost(125); + format %{ "movswl $dst, $mem\t# (ushort/char << 16) >> 16" %} + + ins_encode %{ + __ movswl($dst$$Register, $mem$$Address); + %} + + ins_pipe(ialu_reg_reg); + %} + // Load Unsigned Short/Char (16 bit UNsigned) to Byte (8 bit signed) instruct loadUS2B(rRegI dst, memory mem, immI_24 twentyfour) %{ match(Set dst (RShiftI (LShiftI (LoadUS mem) twentyfour) twentyfour)); ins_cost(125);

src/cpu/x86/vm/x86_64.ad
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File