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
a093f3d5
Commit
a093f3d5
authored
Jan 14, 2011
by
Ken Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix tst instruction on arm to set overflow bit
R=r CC=golang-dev
https://golang.org/cl/4009041
parent
d9ffbc4b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
cgen.c
src/cmd/5g/cgen.c
+1
-1
asm.c
src/cmd/5l/asm.c
+4
-4
No files found.
src/cmd/5g/cgen.c
View file @
a093f3d5
...
@@ -832,7 +832,7 @@ gencmp0(Node *n, Type *t, int o, Prog *to)
...
@@ -832,7 +832,7 @@ gencmp0(Node *n, Type *t, int o, Prog *to)
}
else
}
else
gins
(
ATST
,
&
n1
,
N
);
gins
(
ATST
,
&
n1
,
N
);
a
=
optoas
(
o
,
t
);
a
=
optoas
(
o
,
t
);
patch
(
gbranch
(
optoas
(
o
,
t
)
,
t
),
to
);
patch
(
gbranch
(
a
,
t
),
to
);
regfree
(
&
n1
);
regfree
(
&
n1
);
}
}
...
...
src/cmd/5l/asm.c
View file @
a093f3d5
...
@@ -1559,11 +1559,9 @@ if(debug['G']) print("%ux: %s: arm %d %d %d\n", (uint32)(p->pc), p->from.sym->na
...
@@ -1559,11 +1559,9 @@ if(debug['G']) print("%ux: %s: arm %d %d %d\n", (uint32)(p->pc), p->from.sym->na
o1
|=
(
p
->
from
.
reg
<<
16
);
o1
|=
(
p
->
from
.
reg
<<
16
);
o1
|=
(
p
->
to
.
reg
<<
12
);
o1
|=
(
p
->
to
.
reg
<<
12
);
break
;
break
;
case
90
:
/* tst reg */
case
90
:
/* tst reg */
o1
=
oprrr
(
AMOVW
,
p
->
scond
);
o1
=
oprrr
(
ACMP
+
AEND
,
p
->
scond
);
o1
|=
p
->
from
.
reg
|
(
p
->
from
.
reg
<<
12
);
o1
|=
p
->
from
.
reg
<<
16
;
o1
|=
1
<<
20
;
// SBIT
break
;
break
;
}
}
...
@@ -1716,6 +1714,8 @@ oprrr(int a, int sc)
...
@@ -1716,6 +1714,8 @@ oprrr(int a, int sc)
return
o
|
(
0xe
<<
24
)
|
(
0x0
<<
20
)
|
(
0xb
<<
8
)
|
(
1
<<
4
);
return
o
|
(
0xe
<<
24
)
|
(
0x0
<<
20
)
|
(
0xb
<<
8
)
|
(
1
<<
4
);
case
AMOVFW
+
AEND
:
// copy FtoW
case
AMOVFW
+
AEND
:
// copy FtoW
return
o
|
(
0xe
<<
24
)
|
(
0x1
<<
20
)
|
(
0xb
<<
8
)
|
(
1
<<
4
);
return
o
|
(
0xe
<<
24
)
|
(
0x1
<<
20
)
|
(
0xb
<<
8
)
|
(
1
<<
4
);
case
ACMP
+
AEND
:
// cmp imm
return
o
|
(
0x3
<<
24
)
|
(
0x5
<<
20
);
}
}
diag
(
"bad rrr %d"
,
a
);
diag
(
"bad rrr %d"
,
a
);
prasm
(
curp
);
prasm
(
curp
);
...
...
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