Tue, 16 Aug 2016 15:31:40 +0800
Add gslhx/gslbx instructions for Loongson processors.
src/cpu/mips/vm/assembler_mips.cpp | file | annotate | diff | comparison | revisions | |
src/cpu/mips/vm/assembler_mips.hpp | file | annotate | diff | comparison | revisions |
1.1 --- a/src/cpu/mips/vm/assembler_mips.cpp Tue Aug 16 15:25:30 2016 +0800 1.2 +++ b/src/cpu/mips/vm/assembler_mips.cpp Tue Aug 16 15:31:40 2016 +0800 1.3 @@ -230,7 +230,7 @@ 1.4 }; 1.5 1.6 const char* Assembler::gs_ldc2_name[] = { 1.7 - "", "", "gslwx", "gsldx", "", "", "", "" 1.8 + "gslbx", "gslhx", "gslwx", "gsldx", "", "", "", "" 1.9 }; 1.10 1.11 const char* Assembler::gs_sdc2_name[] = {
2.1 --- a/src/cpu/mips/vm/assembler_mips.hpp Tue Aug 16 15:25:30 2016 +0800 2.2 +++ b/src/cpu/mips/vm/assembler_mips.hpp Tue Aug 16 15:31:40 2016 +0800 2.3 @@ -614,6 +614,8 @@ 2.4 2.5 2.6 enum gs_ldc2_ops { 2.7 + gslbx_op = 0x0, 2.8 + gslhx_op = 0x1, 2.9 gslwx_op = 0x2, 2.10 gsldx_op = 0x3, 2.11 }; 2.12 @@ -1207,6 +1209,16 @@ 2.13 emit_long((gs_ldc2_op << 26) | ((int)base->encoding() << 21) | ((int)rt->encoding() << 16) | ((int)index->encoding() << 11) | (off << 3) | gslwx_op); 2.14 } 2.15 2.16 + void gslhx(Register rt, Register base, Register index, int off) { 2.17 + assert(is_simm(off, 8), "gslhx: off exceeds 8 bits"); 2.18 + emit_long((gs_ldc2_op << 26) | ((int)base->encoding() << 21) | ((int)rt->encoding() << 16) | ((int)index->encoding() << 11) | (off << 3) | gslhx_op); 2.19 + } 2.20 + 2.21 + void gslbx(Register rt, Register base, Register index, int off) { 2.22 + assert(is_simm(off, 8), "gslbx: off exceeds 8 bits"); 2.23 + emit_long((gs_ldc2_op << 26) | ((int)base->encoding() << 21) | ((int)rt->encoding() << 16) | ((int)index->encoding() << 11) | (off << 3) | gslbx_op); 2.24 + } 2.25 + 2.26 void gssdx(Register rt, Register base, Register index, int off) { 2.27 assert(is_simm(off, 8), "gssdx: off exceeds 8 bits"); 2.28 emit_long((gs_sdc2_op << 26) | ((int)base->encoding() << 21) | ((int)rt->encoding() << 16) | ((int)index->encoding() << 11) | (off << 3) | gssdx_op);