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

src/cpu/x86/vm/x86_64.ad

Print this page
rev 767 : [mq]: 6814842

*** 6457,6466 **** --- 6457,6478 ---- %} ins_pipe(ialu_reg_mem); %} + // Load Short (16 bit signed) to Byte (8 bit signed) + instruct loadS2B(rRegI dst, memory mem, immI_24 twentyfour) %{ + match(Set dst (RShiftI (LShiftI (LoadS mem) twentyfour) twentyfour)); + + ins_cost(125); + format %{ "movsbl $dst, $mem\t# short -> byte" %} + ins_encode %{ + __ movsbl($dst$$Register, $mem$$Address); + %} + ins_pipe(ialu_reg_mem); + %} + // Load Short (16 bit signed) into Long Register instruct loadS2L(rRegL dst, memory mem) %{ match(Set dst (ConvI2L (LoadS mem)));
*** 6487,6496 **** --- 6499,6520 ---- %} ins_pipe(ialu_reg_mem); %} + // 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); + format %{ "movsbl $dst, $mem\t# ushort -> byte" %} + ins_encode %{ + __ movsbl($dst$$Register, $mem$$Address); + %} + ins_pipe(ialu_reg_mem); + %} + // Load Unsigned Short/Char (16 bit UNsigned) into Long Register instruct loadUS2L(rRegL dst, memory mem) %{ match(Set dst (ConvI2L (LoadUS mem)));
*** 6517,6526 **** --- 6541,6598 ---- %} ins_pipe(ialu_reg_mem); %} + // Load Integer (32 bit signed) to Byte (8 bit signed) + instruct loadI2B(rRegI dst, memory mem, immI_24 twentyfour) %{ + match(Set dst (RShiftI (LShiftI (LoadI mem) twentyfour) twentyfour)); + + ins_cost(125); + format %{ "movsbl $dst, $mem\t# int -> byte" %} + ins_encode %{ + __ movsbl($dst$$Register, $mem$$Address); + %} + ins_pipe(ialu_reg_mem); + %} + + // Load Integer (32 bit signed) to Unsigned Byte (8 bit UNsigned) + instruct loadI2UB(rRegI dst, memory mem, immI_255 mask) %{ + match(Set dst (AndI (LoadI mem) mask)); + + ins_cost(125); + format %{ "movzbl $dst, $mem\t# int -> ubyte" %} + ins_encode %{ + __ movzbl($dst$$Register, $mem$$Address); + %} + ins_pipe(ialu_reg_mem); + %} + + // Load Integer (32 bit signed) to Short (16 bit signed) + instruct loadI2S(rRegI dst, memory mem, immI_16 sixteen) %{ + match(Set dst (RShiftI (LShiftI (LoadI mem) sixteen) sixteen)); + + ins_cost(125); + format %{ "movswl $dst, $mem\t# int -> short" %} + ins_encode %{ + __ movswl($dst$$Register, $mem$$Address); + %} + ins_pipe(ialu_reg_mem); + %} + + // Load Integer (32 bit signed) to Unsigned Short/Char (16 bit UNsigned) + instruct loadI2US(rRegI dst, memory mem, immI_65535 mask) %{ + match(Set dst (AndI (LoadI mem) mask)); + + ins_cost(125); + format %{ "movzwl $dst, $mem\t# int -> ushort/char" %} + ins_encode %{ + __ movzwl($dst$$Register, $mem$$Address); + %} + ins_pipe(ialu_reg_mem); + %} + // Load Integer into Long Register instruct loadI2L(rRegL dst, memory mem) %{ match(Set dst (ConvI2L (LoadI mem)));
src/cpu/x86/vm/x86_64.ad
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File