Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Franck Pommereau
/
cct
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Issues
0
Wiki
Network
Create a new issue
Commits
Authored by
Franck Pommereau
2018-04-30 11:31:23 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9a633fb3fab7a90ba578a7bce42f0e9e0f7a702a
9a633fb3
1 parent
6e1349f7
reworked stdio and preprocessor
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
3 deletions
cctlib/cpp.py
libc/stdio.c
libc/stdio.asm → libc/stdio_putc.asm
cctlib/cpp.py
View file @
9a633fb
...
...
@@ -10,7 +10,7 @@ def _lnomap (line) :
def
cpp
(
path
,
arch
,
args
)
:
lmap
=
{}
code
=
[]
args
=
[
"cpp"
,
"-D__CCT__
=
%
s
"
%
arch
]
+
args
+
[
path
]
args
=
[
"cpp"
,
"-D__CCT__
"
,
"-D__CCT_
%
s__
"
%
arch
]
+
args
+
[
path
]
pos
=
1
out
=
subprocess
.
check_output
(
args
)
for
line
in
(
l
.
rstrip
()
for
l
in
out
.
decode
()
.
splitlines
())
:
...
...
libc/stdio.c
View file @
9a633fb
#ifdef __CCT__
// CCT compiler with TTC backend
#ifdef __CCT_ttc__
extern
int
putc
(
char
c
);
#define neg(i) -i
#define UINT(i) i
#define _DIGITS "0123456789ABCDEF"
#define _STR "65536"
#else
#endif
// CCT compiler with x86 backend
#ifdef __CCT_x86__
extern
int
putchar
(
int
c
);
#define putc(c) putchar(c)
#define neg(i) -i
#define UINT(i) i
#define _DIGITS "0123456789ABCDEF"
#define _STR "65536"
#endif
// regular compiler
#ifndef __CCT__
extern
int
putchar
(
int
c
);
#define putc(c) putchar(c)
#define neg(i) ~i + 1
...
...
libc/stdio.asm
→
libc/stdio
_putc
.asm
View file @
9a633fb
File moved
Please
register
or
login
to post a comment