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
cfefe6a7
Commit
cfefe6a7
authored
Jul 12, 2013
by
Keith Randall
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd/dist: allow assembly code to use enumerated constants.
R=golang-dev, rsc CC=golang-dev
https://golang.org/cl/11056044
parent
8124a02c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
buildruntime.c
src/cmd/dist/buildruntime.c
+8
-1
No files found.
src/cmd/dist/buildruntime.c
View file @
cfefe6a7
...
@@ -234,10 +234,11 @@ ok:
...
@@ -234,10 +234,11 @@ ok:
// Gobuf 24 sched;
// Gobuf 24 sched;
// 'Y' 48 stack0;
// 'Y' 48 stack0;
// }
// }
// StackMin = 128;
// into output like
// into output like
// #define g_sched 24
// #define g_sched 24
// #define g_stack0 48
// #define g_stack0 48
//
//
#define const_StackMin 128
aggr
=
nil
;
aggr
=
nil
;
splitlines
(
&
lines
,
bstr
(
&
in
));
splitlines
(
&
lines
,
bstr
(
&
in
));
for
(
i
=
0
;
i
<
lines
.
len
;
i
++
)
{
for
(
i
=
0
;
i
<
lines
.
len
;
i
++
)
{
...
@@ -265,6 +266,12 @@ ok:
...
@@ -265,6 +266,12 @@ ok:
p
[
xstrlen
(
p
)
-
1
]
=
'\0'
;
p
[
xstrlen
(
p
)
-
1
]
=
'\0'
;
bwritestr
(
&
out
,
bprintf
(
&
b
,
"#define %s_%s %s
\n
"
,
aggr
,
fields
.
p
[
n
-
1
],
fields
.
p
[
n
-
2
]));
bwritestr
(
&
out
,
bprintf
(
&
b
,
"#define %s_%s %s
\n
"
,
aggr
,
fields
.
p
[
n
-
1
],
fields
.
p
[
n
-
2
]));
}
}
if
(
fields
.
len
==
3
&&
streq
(
fields
.
p
[
1
],
"="
))
{
// generated from enumerated constants
p
=
fields
.
p
[
2
];
if
(
p
[
xstrlen
(
p
)
-
1
]
==
';'
)
p
[
xstrlen
(
p
)
-
1
]
=
'\0'
;
bwritestr
(
&
out
,
bprintf
(
&
b
,
"#define const_%s %s
\n
"
,
fields
.
p
[
0
],
p
));
}
}
}
// Some #defines that are used for .c files.
// Some #defines that are used for .c files.
...
...
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