Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
35d260fa
Commit
35d260fa
authored
Apr 10, 2012
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
6a, 6l: add PREFETCH instructions
R=ken2 CC=golang-dev
https://golang.org/cl/5989073
parent
098b9dcf
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
4 deletions
+22
-4
lex.c
src/cmd/6a/lex.c
+4
-0
6.out.h
src/cmd/6l/6.out.h
+5
-0
optab.c
src/cmd/6l/optab.c
+12
-2
asm_amd64.s
src/pkg/runtime/asm_amd64.s
+1
-2
No files found.
src/cmd/6a/lex.c
View file @
35d260fa
...
...
@@ -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
};
...
...
src/cmd/6l/6.out.h
View file @
35d260fa
...
...
@@ -736,6 +736,11 @@ enum as
ACRC32B
,
ACRC32Q
,
AIMUL3Q
,
APREFETCHT0
,
APREFETCHT1
,
APREFETCHT2
,
APREFETCHNTA
,
ALAST
};
...
...
src/cmd/6l/optab.c
View file @
35d260fa
...
...
@@ -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
...
...
src/pkg/runtime/asm_amd64.s
View file @
35d260fa
...
...
@@ -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);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment