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
531f242f
Commit
531f242f
authored
Mar 30, 2009
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move bits.c from 6g to gc
R=ken OCL=26909 CL=26909
parent
f5387605
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
63 additions
and
40 deletions
+63
-40
Makefile
src/cmd/6g/Makefile
+0
-1
opt.h
src/cmd/6g/opt.h
+1
-36
Makefile
src/cmd/gc/Makefile
+1
-0
bits.c
src/cmd/gc/bits.c
+1
-2
go.h
src/cmd/gc/go.h
+38
-1
make8.bash
src/cmd/make8.bash
+22
-0
No files found.
src/cmd/6g/Makefile
View file @
531f242f
...
@@ -22,7 +22,6 @@ OFILES=\
...
@@ -22,7 +22,6 @@ OFILES=\
obj.
$O
\
obj.
$O
\
peep.
$O
\
peep.
$O
\
reg.
$O
\
reg.
$O
\
bits.
$O
\
../6l/enam.
$O
\
../6l/enam.
$O
\
LIB
=
\
LIB
=
\
...
...
src/cmd/6g/opt.h
View file @
531f242f
...
@@ -28,13 +28,9 @@
...
@@ -28,13 +28,9 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// THE SOFTWARE.
#define Z N
#define Z N
#define Adr Addr
#define Adr Addr
#define BITS 5
#define NVAR (BITS*sizeof(uint32)*8)
#define D_HI D_NONE
#define D_HI D_NONE
#define D_LO D_NONE
#define D_LO D_NONE
...
@@ -50,16 +46,9 @@
...
@@ -50,16 +46,9 @@
#define CINF 1000
#define CINF 1000
#define LOOP 3
#define LOOP 3
typedef
struct
Bits
Bits
;
typedef
struct
Reg
Reg
;
typedef
struct
Reg
Reg
;
typedef
struct
Var
Var
;
typedef
struct
Rgn
Rgn
;
typedef
struct
Rgn
Rgn
;
struct
Bits
{
uint32
b
[
BITS
];
};
struct
Reg
struct
Reg
{
{
...
@@ -91,14 +80,6 @@ struct Reg
...
@@ -91,14 +80,6 @@ struct Reg
};
};
#define R ((Reg*)0)
#define R ((Reg*)0)
struct
Var
{
vlong
offset
;
Sym
*
sym
;
char
name
;
char
etype
;
};
#define NRGN 600
#define NRGN 600
struct
Rgn
struct
Rgn
{
{
...
@@ -108,14 +89,12 @@ struct Rgn
...
@@ -108,14 +89,12 @@ struct Rgn
short
regno
;
short
regno
;
};
};
EXTERN
int32
exregoffset
;
// not set
EXTERN
int32
exregoffset
;
// not set
EXTERN
int32
exfregoffset
;
// not set
EXTERN
int32
exfregoffset
;
// not set
EXTERN
Reg
*
firstr
;
EXTERN
Reg
*
firstr
;
EXTERN
Reg
*
lastr
;
EXTERN
Reg
*
lastr
;
EXTERN
Reg
zreg
;
EXTERN
Reg
zreg
;
EXTERN
Reg
*
freer
;
EXTERN
Reg
*
freer
;
EXTERN
Var
var
[
NVAR
];
EXTERN
Reg
**
rpo2r
;
EXTERN
Reg
**
rpo2r
;
EXTERN
Rgn
region
[
NRGN
];
EXTERN
Rgn
region
[
NRGN
];
EXTERN
Rgn
*
rgp
;
EXTERN
Rgn
*
rgp
;
...
@@ -129,24 +108,10 @@ EXTERN Bits consts;
...
@@ -129,24 +108,10 @@ EXTERN Bits consts;
EXTERN
Bits
addrs
;
EXTERN
Bits
addrs
;
EXTERN
Bits
ovar
;
EXTERN
Bits
ovar
;
EXTERN
int
change
;
EXTERN
int
change
;
EXTERN
Bits
zbits
;
EXTERN
int32
maxnr
;
EXTERN
int32
maxnr
;
EXTERN
int32
*
idom
;
EXTERN
int32
*
idom
;
/*
EXTERN
struct
* bits.c
*/
Bits
bor
(
Bits
,
Bits
);
Bits
band
(
Bits
,
Bits
);
Bits
bnot
(
Bits
);
int
bany
(
Bits
*
);
int
bnum
(
Bits
);
Bits
blsh
(
uint
);
int
beq
(
Bits
,
Bits
);
int
bset
(
Bits
,
uint
);
int
Qconv
(
Fmt
*
fp
);
int
bitno
(
int32
);
struct
{
{
int32
ncvtreg
;
int32
ncvtreg
;
int32
nspill
;
int32
nspill
;
...
...
src/cmd/gc/Makefile
View file @
531f242f
...
@@ -28,6 +28,7 @@ OFILES=\
...
@@ -28,6 +28,7 @@ OFILES=\
mparith3.
$O
\
mparith3.
$O
\
builtin.
$O
\
builtin.
$O
\
compat.
$O
\
compat.
$O
\
bits.
$O
\
$(LIB)
:
$(OFILES)
$(LIB)
:
$(OFILES)
ar rsc
$(LIB)
$(OFILES)
ar rsc
$(LIB)
$(OFILES)
...
...
src/cmd/
6g
/bits.c
→
src/cmd/
gc
/bits.c
View file @
531f242f
...
@@ -28,8 +28,7 @@
...
@@ -28,8 +28,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// THE SOFTWARE.
#include "gg.h"
#include "go.h"
#include "opt.h"
Bits
Bits
bor
(
Bits
a
,
Bits
b
)
bor
(
Bits
a
,
Bits
b
)
...
...
src/cmd/gc/go.h
View file @
531f242f
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
#include "compat.h"
#include "compat.h"
#ifndef EXTERN
#ifndef EXTERN
#define
EXTERN extern
#define
EXTERN extern
#endif
#endif
enum
enum
{
{
...
@@ -420,6 +420,29 @@ enum
...
@@ -420,6 +420,29 @@ enum
Erv
,
// evaluated in rvalue context
Erv
,
// evaluated in rvalue context
};
};
#define BITS 5
#define NVAR (BITS*sizeof(uint32)*8)
typedef
struct
Bits
Bits
;
struct
Bits
{
uint32
b
[
BITS
];
};
EXTERN
Bits
zbits
;
typedef
struct
Var
Var
;
struct
Var
{
vlong
offset
;
Sym
*
sym
;
char
name
;
char
etype
;
};
EXTERN
Var
var
[
NVAR
];
typedef
struct
Io
Io
;
typedef
struct
Io
Io
;
struct
Io
struct
Io
{
{
...
@@ -871,3 +894,17 @@ Node* nodarg(Type*, int);
...
@@ -871,3 +894,17 @@ Node* nodarg(Type*, int);
void
nodconst
(
Node
*
,
Type
*
,
vlong
);
void
nodconst
(
Node
*
,
Type
*
,
vlong
);
Type
*
deep
(
Type
*
);
Type
*
deep
(
Type
*
);
Type
*
shallow
(
Type
*
);
Type
*
shallow
(
Type
*
);
/*
* bits.c
*/
Bits
bor
(
Bits
,
Bits
);
Bits
band
(
Bits
,
Bits
);
Bits
bnot
(
Bits
);
int
bany
(
Bits
*
);
int
bnum
(
Bits
);
Bits
blsh
(
uint
);
int
beq
(
Bits
,
Bits
);
int
bset
(
Bits
,
uint
);
int
Qconv
(
Fmt
*
fp
);
int
bitno
(
int32
);
src/cmd/make8.bash
0 → 100644
View file @
531f242f
# Copyright 2009 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
#!/bin/bash
set
-e
bash clean.bash
cd
8l
bash mkenam
make enam.o
cd
..
for
i
in
cc 8l 8a 8c gc 8g ar db nm acid cov gobuild godefs prof gotest
do
echo
;
echo
;
echo
%%%% making
$i
%%%%
;
echo
cd
$i
make
install
cd
..
done
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