Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
fb3f38da
Commit
fb3f38da
authored
Nov 06, 2012
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compiler, libgo: Fixes to prepare for 64-bit int.
From-SVN: r193254
parent
855a44ee
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
28 additions
and
21 deletions
+28
-21
gcc/go/gofrontend/types.cc
+6
-2
libgo/go/bytes/indexbyte.c
+2
-2
libgo/go/log/syslog/syslog_c.c
+4
-2
libgo/go/syscall/signame.c
+3
-3
libgo/runtime/cpuprof.c
+1
-1
libgo/runtime/go-new-map.c
+3
-2
libgo/runtime/go-rune.c
+1
-1
libgo/runtime/go-string.h
+1
-1
libgo/runtime/go-traceback.c
+2
-2
libgo/runtime/proc.c
+2
-2
libgo/runtime/runtime.h
+2
-2
libgo/runtime/string.goc
+1
-1
No files found.
gcc/go/gofrontend/types.cc
View file @
fb3f38da
...
...
@@ -2568,8 +2568,12 @@ Integer_type::create_abstract_integer_type()
{
static
Integer_type
*
abstract_type
;
if
(
abstract_type
==
NULL
)
abstract_type
=
new
Integer_type
(
true
,
false
,
INT_TYPE_SIZE
,
RUNTIME_TYPE_KIND_INT
);
{
Type
*
int_type
=
Type
::
lookup_integer_type
(
"int"
);
abstract_type
=
new
Integer_type
(
true
,
false
,
int_type
->
integer_type
()
->
bits
(),
RUNTIME_TYPE_KIND_INT
);
}
return
abstract_type
;
}
...
...
libgo/go/bytes/indexbyte.c
View file @
fb3f38da
...
...
@@ -13,11 +13,11 @@
We deliberately don't split the stack in case it does call the
library function, which shouldn't need much stack space. */
int
IndexByte
(
struct
__go_open_array
,
char
)
int
go
IndexByte
(
struct
__go_open_array
,
char
)
asm
(
"bytes.IndexByte"
)
__attribute__
((
no_split_stack
));
int
int
go
IndexByte
(
struct
__go_open_array
s
,
char
b
)
{
char
*
p
;
...
...
libgo/go/log/syslog/syslog_c.c
View file @
fb3f38da
...
...
@@ -6,14 +6,16 @@
#include <syslog.h>
#include "runtime.h"
/* We need to use a C function to call the syslog function, because we
can't represent a C varargs function in Go. */
void
syslog_c
(
int
,
const
char
*
)
void
syslog_c
(
int
go
,
const
char
*
)
asm
(
"log_syslog.syslog_c"
);
void
syslog_c
(
int
priority
,
const
char
*
msg
)
syslog_c
(
int
go
priority
,
const
char
*
msg
)
{
syslog
(
priority
,
"%s"
,
msg
);
}
libgo/go/syscall/signame.c
View file @
fb3f38da
...
...
@@ -10,10 +10,10 @@
#include "arch.h"
#include "malloc.h"
String
Signame
(
int
sig
)
asm
(
"syscall.Signame"
);
String
Signame
(
int
go
sig
)
asm
(
"syscall.Signame"
);
String
Signame
(
int
sig
)
Signame
(
int
go
sig
)
{
const
char
*
s
=
NULL
;
char
buf
[
100
];
...
...
@@ -27,7 +27,7 @@ Signame (int sig)
if
(
s
==
NULL
)
{
snprintf
(
buf
,
sizeof
buf
,
"signal %
d"
,
sig
);
snprintf
(
buf
,
sizeof
buf
,
"signal %
ld"
,
(
long
)
sig
);
s
=
buf
;
}
len
=
__builtin_strlen
(
s
);
...
...
libgo/runtime/cpuprof.c
View file @
fb3f38da
...
...
@@ -124,7 +124,7 @@ static uintptr eod[3] = {0, 1, 0};
static
void
LostProfileData
(
void
)
{
}
extern
void
runtime_SetCPUProfileRate
(
int
32
)
extern
void
runtime_SetCPUProfileRate
(
int
go
)
__asm__
(
"runtime.SetCPUProfileRate"
);
// SetCPUProfileRate sets the CPU profiling rate.
...
...
libgo/runtime/go-new-map.c
View file @
fb3f38da
...
...
@@ -106,10 +106,11 @@ __go_map_next_prime (uintptr_t n)
struct
__go_map
*
__go_new_map
(
const
struct
__go_map_descriptor
*
descriptor
,
uintptr_t
entries
)
{
int
go
ientries
;
int
32
ientries
;
struct
__go_map
*
ret
;
ientries
=
(
intgo
)
entries
;
/* The master library limits map entries to int32, so we do too. */
ientries
=
(
int32
)
entries
;
if
(
ientries
<
0
||
(
uintptr_t
)
ientries
!=
entries
)
runtime_panicstring
(
"map size out of range"
);
...
...
libgo/runtime/go-rune.c
View file @
fb3f38da
...
...
@@ -14,7 +14,7 @@
characters used from STR. */
int
__go_get_rune
(
const
unsigned
char
*
str
,
size_t
len
,
int
*
rune
)
__go_get_rune
(
const
unsigned
char
*
str
,
size_t
len
,
int
32
*
rune
)
{
int
c
,
c1
,
c2
,
c3
,
l
;
...
...
libgo/runtime/go-string.h
View file @
fb3f38da
...
...
@@ -26,6 +26,6 @@ __go_ptr_strings_equal (const String *ps1, const String *ps2)
return
__go_strings_equal
(
*
ps1
,
*
ps2
);
}
extern
int
__go_get_rune
(
const
unsigned
char
*
,
size_t
,
int
*
);
extern
int
__go_get_rune
(
const
unsigned
char
*
,
size_t
,
int
32
*
);
#endif
/* !defined(LIBGO_GO_STRING_H) */
libgo/runtime/go-traceback.c
View file @
fb3f38da
...
...
@@ -29,13 +29,13 @@ runtime_printtrace (uintptr *pcbuf, int32 c)
{
String
fn
;
String
file
;
int
line
;
int
go
line
;
if
(
__go_file_line
(
pcbuf
[
i
],
&
fn
,
&
file
,
&
line
)
&&
runtime_showframe
(
fn
.
str
))
{
runtime_printf
(
"%S
\n
"
,
fn
);
runtime_printf
(
"
\t
%S:%
d
\n
"
,
file
,
line
);
runtime_printf
(
"
\t
%S:%
D
\n
"
,
file
,
(
int64
)
line
);
}
}
}
libgo/runtime/proc.c
View file @
fb3f38da
...
...
@@ -610,11 +610,11 @@ runtime_goroutinetrailer(G *g)
if
(
g
!=
nil
&&
g
->
gopc
!=
0
&&
g
->
goid
!=
1
)
{
String
fn
;
String
file
;
int
line
;
int
go
line
;
if
(
__go_file_line
(
g
->
gopc
-
1
,
&
fn
,
&
file
,
&
line
))
{
runtime_printf
(
"created by %S
\n
"
,
fn
);
runtime_printf
(
"
\t
%S:%
d
\n
"
,
file
,
line
);
runtime_printf
(
"
\t
%S:%
D
\n
"
,
file
,
(
int64
)
line
);
}
}
}
...
...
libgo/runtime/runtime.h
View file @
fb3f38da
...
...
@@ -341,7 +341,7 @@ int32 runtime_ncpu;
/*
* common functions and data
*/
int
32
runtime_findnull
(
const
byte
*
);
int
go
runtime_findnull
(
const
byte
*
);
void
runtime_dump
(
byte
*
,
int32
);
/*
...
...
@@ -614,7 +614,7 @@ extern uintptr runtime_stacks_sys;
struct
backtrace_state
;
extern
struct
backtrace_state
*
__go_get_backtrace_state
(
void
);
extern
_Bool
__go_file_line
(
uintptr
,
String
*
,
String
*
,
int
*
);
extern
_Bool
__go_file_line
(
uintptr
,
String
*
,
String
*
,
int
go
*
);
extern
byte
*
runtime_progname
();
int32
getproccount
(
void
);
libgo/runtime/string.goc
View file @
fb3f38da
...
...
@@ -54,7 +54,7 @@ func stringiter(s String, k int) (retk int) {
out
:
}
func
stringiter2
(
s
String
,
k
int
)
(
retk
int
,
retv
int
)
{
func
stringiter2
(
s
String
,
k
int
)
(
retk
int
,
retv
int
32
)
{
if
(
k
>=
s
.
len
)
{
//
retk
=
0
is
end
of
iteration
retk
=
0
;
...
...
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