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
2c050571
Commit
2c050571
authored
Oct 30, 2008
by
Ken Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shift bugs
R=r OCL=18095 CL=18095
parent
9639bd0d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
5 deletions
+9
-5
const.c
src/cmd/gc/const.c
+1
-1
mparith2.c
src/cmd/gc/mparith2.c
+2
-2
walk.c
src/cmd/gc/walk.c
+6
-2
No files found.
src/cmd/gc/const.c
View file @
2c050571
...
@@ -12,6 +12,7 @@ convlit(Node *n, Type *t)
...
@@ -12,6 +12,7 @@ convlit(Node *n, Type *t)
if
(
n
==
N
||
t
==
T
)
if
(
n
==
N
||
t
==
T
)
return
;
return
;
switch
(
n
->
op
)
{
switch
(
n
->
op
)
{
default:
default:
return
;
return
;
...
@@ -25,7 +26,6 @@ convlit(Node *n, Type *t)
...
@@ -25,7 +26,6 @@ convlit(Node *n, Type *t)
}
}
et
=
t
->
etype
;
et
=
t
->
etype
;
wt
=
whatis
(
n
);
wt
=
whatis
(
n
);
switch
(
wt
)
{
switch
(
wt
)
{
...
...
src/cmd/gc/mparith2.c
View file @
2c050571
...
@@ -84,7 +84,7 @@ mprsh(Mpint *a)
...
@@ -84,7 +84,7 @@ mprsh(Mpint *a)
if
(
x
&
1
)
if
(
x
&
1
)
c
=
Mpbase
;
c
=
Mpbase
;
}
}
if
(
a
->
neg
&&
lo
=
=
0
)
if
(
a
->
neg
&&
lo
!
=
0
)
mpaddcfix
(
a
,
-
1
);
mpaddcfix
(
a
,
-
1
);
}
}
...
@@ -105,7 +105,7 @@ mprshw(Mpint *a)
...
@@ -105,7 +105,7 @@ mprshw(Mpint *a)
a1
++
;
a1
++
;
}
}
a1
[
0
]
=
0
;
a1
[
0
]
=
0
;
if
(
a
->
neg
&&
lo
=
=
0
)
if
(
a
->
neg
&&
lo
!
=
0
)
mpaddcfix
(
a
,
-
1
);
mpaddcfix
(
a
,
-
1
);
}
}
...
...
src/cmd/gc/walk.c
View file @
2c050571
...
@@ -170,6 +170,8 @@ walktype(Node *n, int top)
...
@@ -170,6 +170,8 @@ walktype(Node *n, int top)
int
et
,
cl
,
cr
;
int
et
,
cl
,
cr
;
int32
lno
;
int32
lno
;
if
(
n
==
N
)
return
;
lno
=
setlineno
(
n
);
lno
=
setlineno
(
n
);
/*
/*
...
@@ -645,8 +647,10 @@ loop:
...
@@ -645,8 +647,10 @@ loop:
evconst
(
n
);
evconst
(
n
);
if
(
n
->
op
==
OLITERAL
)
if
(
n
->
op
==
OLITERAL
)
goto
ret
;
goto
ret
;
convlit
(
n
->
right
,
types
[
TUINT
]);
if
(
n
->
left
->
type
==
T
)
convlit
(
n
->
left
,
types
[
TINT
]);
convlit
(
n
->
left
,
types
[
TINT
]);
if
(
n
->
right
->
type
==
T
)
convlit
(
n
->
right
,
types
[
TUINT
]);
if
(
n
->
left
->
type
==
T
||
n
->
right
->
type
==
T
)
if
(
n
->
left
->
type
==
T
||
n
->
right
->
type
==
T
)
goto
ret
;
goto
ret
;
if
(
issigned
[
n
->
right
->
type
->
etype
])
if
(
issigned
[
n
->
right
->
type
->
etype
])
...
...
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