Mercurial > hg > truffle
comparison src/cpu/sparc/vm/assembler_sparc.hpp @ 3892:baf763f388e6
7059037: Use BIS for zeroing on T4
Summary: Use BIS for zeroing new allocated big (2Kb and more) objects and arrays.
Reviewed-by: never, twisti, ysr
author | kvn |
---|---|
date | Fri, 26 Aug 2011 08:52:22 -0700 |
parents | 1af104d6cf99 |
children | d968f546734e |
comparison
equal
deleted
inserted
replaced
3891:ac8738449b6f | 3892:baf763f388e6 |
---|---|
883 static bool is_in_wdisp30_range(address a, address b) { | 883 static bool is_in_wdisp30_range(address a, address b) { |
884 return is_in_wdisp_range(a, b, 30); | 884 return is_in_wdisp_range(a, b, 30); |
885 } | 885 } |
886 | 886 |
887 enum ASIs { // page 72, v9 | 887 enum ASIs { // page 72, v9 |
888 ASI_PRIMARY = 0x80, | 888 ASI_PRIMARY = 0x80, |
889 ASI_PRIMARY_LITTLE = 0x88, | 889 ASI_PRIMARY_NOFAULT = 0x82, |
890 ASI_PRIMARY_LITTLE = 0x88, | |
890 // Block initializing store | 891 // Block initializing store |
891 ASI_ST_BLKINIT_PRIMARY = 0xE2, | 892 ASI_ST_BLKINIT_PRIMARY = 0xE2, |
892 // Most-Recently-Used (MRU) BIS variant | 893 // Most-Recently-Used (MRU) BIS variant |
893 ASI_ST_BLKINIT_MRU_PRIMARY = 0xF2 | 894 ASI_ST_BLKINIT_MRU_PRIMARY = 0xF2 |
894 // add more from book as needed | 895 // add more from book as needed |
1784 inline void wrccr(Register s) { v9_only(); emit_long( op(arith_op) | rs1(s) | op3(wrreg_op3) | u_field(2, 29, 25)); } | 1785 inline void wrccr(Register s) { v9_only(); emit_long( op(arith_op) | rs1(s) | op3(wrreg_op3) | u_field(2, 29, 25)); } |
1785 inline void wrccr(Register s, int simm13a) { v9_only(); emit_long( op(arith_op) | | 1786 inline void wrccr(Register s, int simm13a) { v9_only(); emit_long( op(arith_op) | |
1786 rs1(s) | | 1787 rs1(s) | |
1787 op3(wrreg_op3) | | 1788 op3(wrreg_op3) | |
1788 u_field(2, 29, 25) | | 1789 u_field(2, 29, 25) | |
1789 u_field(1, 13, 13) | | 1790 immed(true) | |
1790 simm(simm13a, 13)); } | 1791 simm(simm13a, 13)); } |
1791 inline void wrasi( Register d) { v9_only(); emit_long( op(arith_op) | rs1(d) | op3(wrreg_op3) | u_field(3, 29, 25)); } | 1792 inline void wrasi(Register d) { v9_only(); emit_long( op(arith_op) | rs1(d) | op3(wrreg_op3) | u_field(3, 29, 25)); } |
1793 // wrasi(d, imm) stores (d xor imm) to asi | |
1794 inline void wrasi(Register d, int simm13a) { v9_only(); emit_long( op(arith_op) | rs1(d) | op3(wrreg_op3) | | |
1795 u_field(3, 29, 25) | immed(true) | simm(simm13a, 13)); } | |
1792 inline void wrfprs( Register d) { v9_only(); emit_long( op(arith_op) | rs1(d) | op3(wrreg_op3) | u_field(6, 29, 25)); } | 1796 inline void wrfprs( Register d) { v9_only(); emit_long( op(arith_op) | rs1(d) | op3(wrreg_op3) | u_field(6, 29, 25)); } |
1793 | 1797 |
1794 | 1798 |
1795 // VIS3 instructions | 1799 // VIS3 instructions |
1796 | 1800 |
2629 | 2633 |
2630 // Compare char[] arrays aligned to 4 bytes. | 2634 // Compare char[] arrays aligned to 4 bytes. |
2631 void char_arrays_equals(Register ary1, Register ary2, | 2635 void char_arrays_equals(Register ary1, Register ary2, |
2632 Register limit, Register result, | 2636 Register limit, Register result, |
2633 Register chr1, Register chr2, Label& Ldone); | 2637 Register chr1, Register chr2, Label& Ldone); |
2638 // Use BIS for zeroing | |
2639 void bis_zeroing(Register to, Register count, Register temp, Label& Ldone); | |
2634 | 2640 |
2635 #undef VIRTUAL | 2641 #undef VIRTUAL |
2636 | 2642 |
2637 }; | 2643 }; |
2638 | 2644 |