Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
96c785de
Commit
96c785de
authored
Feb 25, 2011
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
5a, 5l: add LDREXD, STREXD
R=ken2 CC=golang-dev
https://golang.org/cl/4239041
parent
ad8b0d91
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
1 deletion
+30
-1
src/cmd/5a/lex.c
src/cmd/5a/lex.c
+2
-0
src/cmd/5l/5.out.h
src/cmd/5l/5.out.h
+3
-0
src/cmd/5l/asm.c
src/cmd/5l/asm.c
+20
-1
src/cmd/5l/optab.c
src/cmd/5l/optab.c
+3
-0
src/cmd/5l/span.c
src/cmd/5l/span.c
+2
-0
No files found.
src/cmd/5a/lex.c
View file @
96c785de
...
...
@@ -364,7 +364,9 @@ struct
"MOVWF"
,
LTYPE3
,
AMOVWF
,
"LDREX"
,
LTYPE3
,
ALDREX
,
"LDREXD"
,
LTYPE3
,
ALDREXD
,
"STREX"
,
LTYPE9
,
ASTREX
,
"STREXD"
,
LTYPE9
,
ASTREXD
,
/*
"ABSF", LTYPEI, AABSF,
...
...
src/cmd/5l/5.out.h
View file @
96c785de
...
...
@@ -180,6 +180,9 @@ enum as
ALDREX
,
ASTREX
,
ALDREXD
,
ASTREXD
,
ALAST
,
};
...
...
src/cmd/5l/asm.c
View file @
96c785de
...
...
@@ -1463,7 +1463,7 @@ if(debug['G']) print("%ux: %s: arm %d %d %d\n", (uint32)(p->pc), p->from.sym->na
aclass
(
&
p
->
from
);
if
(
instoffset
!=
0
)
diag
(
"offset must be zero in STREX"
);
o1
=
(
0x
3
<<
23
)
|
(
0xf9
<<
4
);
o1
=
(
0x
18
<<
20
)
|
(
0xf90
);
o1
|=
p
->
from
.
reg
<<
16
;
o1
|=
p
->
reg
<<
0
;
o1
|=
p
->
to
.
reg
<<
12
;
...
...
@@ -1553,6 +1553,25 @@ if(debug['G']) print("%ux: %s: arm %d %d %d\n", (uint32)(p->pc), p->from.sym->na
o1
=
oprrr
(
ACMP
+
AEND
,
p
->
scond
);
o1
|=
p
->
from
.
reg
<<
16
;
break
;
case
91
:
/* ldrexd oreg,reg */
aclass
(
&
p
->
from
);
if
(
instoffset
!=
0
)
diag
(
"offset must be zero in LDREX"
);
o1
=
(
0x1b
<<
20
)
|
(
0xf9f
);
o1
|=
p
->
from
.
reg
<<
16
;
o1
|=
p
->
to
.
reg
<<
12
;
o1
|=
(
p
->
scond
&
C_SCOND
)
<<
28
;
break
;
case
92
:
/* strexd reg,oreg,reg */
aclass
(
&
p
->
from
);
if
(
instoffset
!=
0
)
diag
(
"offset must be zero in STREX"
);
o1
=
(
0x1a
<<
20
)
|
(
0xf90
);
o1
|=
p
->
from
.
reg
<<
16
;
o1
|=
p
->
reg
<<
0
;
o1
|=
p
->
to
.
reg
<<
12
;
o1
|=
(
p
->
scond
&
C_SCOND
)
<<
28
;
break
;
}
out
[
0
]
=
o1
;
...
...
src/cmd/5l/optab.c
View file @
96c785de
...
...
@@ -253,5 +253,8 @@ Optab optab[] =
{
ATST
,
C_REG
,
C_NONE
,
C_NONE
,
90
,
4
,
0
},
{
ALDREXD
,
C_SOREG
,
C_NONE
,
C_REG
,
91
,
4
,
0
},
{
ASTREXD
,
C_SOREG
,
C_REG
,
C_REG
,
92
,
4
,
0
},
{
AXXX
,
C_NONE
,
C_NONE
,
C_NONE
,
0
,
4
,
0
},
};
src/cmd/5l/span.c
View file @
96c785de
...
...
@@ -1054,6 +1054,8 @@ buildop(void)
case
ALDREX
:
case
ASTREX
:
case
ALDREXD
:
case
ASTREXD
:
case
ATST
:
break
;
}
...
...
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