Commit 35d260fa authored by Russ Cox's avatar Russ Cox

6a, 6l: add PREFETCH instructions

R=ken2
CC=golang-dev
https://golang.org/cl/5989073
parent 098b9dcf
......@@ -1001,6 +1001,10 @@ struct
"XORPS", LTYPE3, AXORPS,
"CRC32B", LTYPE4, ACRC32B,
"CRC32Q", LTYPE4, ACRC32Q,
"PREFETCHT0", LTYPE2, APREFETCHT0,
"PREFETCHT1", LTYPE2, APREFETCHT1,
"PREFETCHT2", LTYPE2, APREFETCHT2,
"PREFETCHNTA", LTYPE2, APREFETCHNTA,
0
};
......
......@@ -736,6 +736,11 @@ enum as
ACRC32B,
ACRC32Q,
AIMUL3Q,
APREFETCHT0,
APREFETCHT1,
APREFETCHT2,
APREFETCHNTA,
ALAST
};
......
......@@ -539,6 +539,11 @@ uchar ycrc32l[] =
{
Yml, Yrl, Zlitm_r, 0,
};
uchar yprefetch[] =
{
Ym, Ynone, Zm_o, 2,
0,
};
/*
* You are doasm, holding in your hand a Prog* with p->as set to, say, ACRC32,
......@@ -1270,8 +1275,13 @@ Optab optab[] =
{ AXADDQ, yrl_ml, Pw, 0x0f,0xc1 },
{ AXADDW, yrl_ml, Pe, 0x0f,0xc1 },
{ ACRC32B, ycrc32l,Px, 0xf2,0x0f,0x38,0xf0,0},
{ ACRC32Q, ycrc32l,Pw, 0xf2,0x0f,0x38,0xf1,0},
{ ACRC32B, ycrc32l,Px, 0xf2,0x0f,0x38,0xf0,0 },
{ ACRC32Q, ycrc32l,Pw, 0xf2,0x0f,0x38,0xf1,0 },
{ APREFETCHT0, yprefetch, Pm, 0x18,(01) },
{ APREFETCHT1, yprefetch, Pm, 0x18,(02) },
{ APREFETCHT2, yprefetch, Pm, 0x18,(03) },
{ APREFETCHNTA, yprefetch, Pm, 0x18,(00) },
{ AEND },
0
......
......@@ -443,8 +443,7 @@ TEXT runtime·atomicstore64(SB), 7, $0
TEXT runtime·prefetch(SB), 7, $0
MOVQ 8(SP), AX
// PREFETCHNTA (AX)
BYTE $0x0f; BYTE $0x18; BYTE $0x00
PREFETCHNTA (AX)
RET
// void jmpdefer(fn, sp);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment