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
f70e2851
Commit
f70e2851
authored
Aug 10, 2009
by
Ken Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug in int8 mod
R=rsc OCL=32971 CL=32971
parent
e4603db3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
ggen.c
src/cmd/6g/ggen.c
+2
-3
No files found.
src/cmd/6g/ggen.c
View file @
f70e2851
...
@@ -600,7 +600,6 @@ cgen_div(int op, Node *nl, Node *nr, Node *res)
...
@@ -600,7 +600,6 @@ cgen_div(int op, Node *nl, Node *nr, Node *res)
if
(
n
<
0
)
if
(
n
<
0
)
goto
divbymul
;
goto
divbymul
;
switch
(
n
)
{
switch
(
n
)
{
case
0
:
case
0
:
// divide by 1
// divide by 1
...
@@ -618,7 +617,7 @@ cgen_div(int op, Node *nl, Node *nr, Node *res)
...
@@ -618,7 +617,7 @@ cgen_div(int op, Node *nl, Node *nr, Node *res)
// divide by 2
// divide by 2
if
(
op
==
OMOD
)
{
if
(
op
==
OMOD
)
{
if
(
issigned
[
nl
->
type
->
etype
])
if
(
issigned
[
nl
->
type
->
etype
])
goto
long
mod
;
goto
long
div
;
regalloc
(
&
n1
,
nl
->
type
,
res
);
regalloc
(
&
n1
,
nl
->
type
,
res
);
cgen
(
nl
,
&
n1
);
cgen
(
nl
,
&
n1
);
nodconst
(
&
n2
,
nl
->
type
,
1
);
nodconst
(
&
n2
,
nl
->
type
,
1
);
...
@@ -643,7 +642,7 @@ cgen_div(int op, Node *nl, Node *nr, Node *res)
...
@@ -643,7 +642,7 @@ cgen_div(int op, Node *nl, Node *nr, Node *res)
default:
default:
if
(
op
==
OMOD
)
{
if
(
op
==
OMOD
)
{
if
(
issigned
[
nl
->
type
->
etype
])
if
(
issigned
[
nl
->
type
->
etype
])
goto
long
mod
;
goto
long
div
;
regalloc
(
&
n1
,
nl
->
type
,
res
);
regalloc
(
&
n1
,
nl
->
type
,
res
);
cgen
(
nl
,
&
n1
);
cgen
(
nl
,
&
n1
);
nodconst
(
&
n2
,
nl
->
type
,
mpgetfix
(
nr
->
val
.
u
.
xval
)
-
1
);
nodconst
(
&
n2
,
nl
->
type
,
mpgetfix
(
nr
->
val
.
u
.
xval
)
-
1
);
...
...
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