mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 06:14:49 +02:00
8005522: use fast-string instructions on x86 for zeroing
Use 'rep stosb' instead of 'rep stosq' when fast-string operations are available. Reviewed-by: twisti, roland
This commit is contained in:
parent
73d6d417be
commit
cfcd28fd9d
10 changed files with 95 additions and 22 deletions
|
@ -2544,12 +2544,18 @@ void Assembler::rep_mov() {
|
|||
emit_int8((unsigned char)0xA5);
|
||||
}
|
||||
|
||||
// sets rcx bytes with rax, value at [edi]
|
||||
void Assembler::rep_stosb() {
|
||||
emit_int8((unsigned char)0xF3); // REP
|
||||
LP64_ONLY(prefix(REX_W));
|
||||
emit_int8((unsigned char)0xAA); // STOSB
|
||||
}
|
||||
|
||||
// sets rcx pointer sized words with rax, value at [edi]
|
||||
// generic
|
||||
void Assembler::rep_set() { // rep_set
|
||||
emit_int8((unsigned char)0xF3);
|
||||
// STOSQ
|
||||
LP64_ONLY(prefix(REX_W));
|
||||
void Assembler::rep_stos() {
|
||||
emit_int8((unsigned char)0xF3); // REP
|
||||
LP64_ONLY(prefix(REX_W)); // LP64:STOSQ, LP32:STOSD
|
||||
emit_int8((unsigned char)0xAB);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue