Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
H
hostCompiledSimulation
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
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
Gaurav Kukreja
hostCompiledSimulation
Commits
f2aa5106
Commit
f2aa5106
authored
May 28, 2014
by
Gaurav Kukreja
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added simple/ir_c/Makefile
Signed-off-by:
Gaurav Kukreja
<
gaurav@gauravk.in
>
parent
53e359fa
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
112 additions
and
0 deletions
+112
-0
Makefile
examples/simple/ir_c/Makefile
+46
-0
ir2c.h
examples/simple/ir_c/ir2c.h
+0
-0
simple_IR.c
examples/simple/ir_c/simple_IR.c
+66
-0
No files found.
examples/simple/ir_c/Makefile
0 → 100644
View file @
f2aa5106
# Makefile to compile the C Example code
# make all - generates the debug information, and binary code for all the
# examples in the folder.
include
../../Makefile.macros
TREEDUMP
=
-fdump-tree-all-blocks-details
OPT
=
-O2
#is O3 in original MiBench download. Use O3 for final testing
DEBUG
=
-g
#IRDUMP = 1 #defined - dump IR files, undefined - don't.
#PRINT = 1 #if defined and PHASE defined, include soft-float lib. fprintf uses floating point
ifdef
PHASE
CC
=
$(CROSS_GCC)
OBJDUMP
=
$(CROSS_OBJDUMP)
OEXT
=
elf
ifdef
IRDUMP
COPTS
=
-static
${
OPT
}
${
TREEDUMP
}
else
COPTS
=
-static
${
OPT
}
endif
ifdef
PRINT
COPTS
+=
-msoft-float
endif
else
CC
=
$(GCC)
OBJDUMP
=
$(HOST_OBJDUMP)
OEXT
=
out
ifdef
IRDUMP
COPTS
=
-static
${
OPT
}
else
COPTS
=
-static
${
OPT
}
endif
endif
all
:
simple_IR
simple_IR
:
simple_IR.c
$(CC)
$(COPTS)
-o
$@
.
$(OEXT)
$^
test
:
clean
:
rm
-rf
*
.o
*
.c.
*
simple_IR.elf simple_IR.out
\ No newline at end of file
examples/simple/ir_c/ir2c.h
0 → 100644
View file @
f2aa5106
examples/simple/ir_c/simple_IR.c
0 → 100644
View file @
f2aa5106
/***********************************************************
Intermediate representation of
simple/app_dir/simple.c
Converted by ir2c v0.1
***********************************************************/
#include <limits.h>
#include <stdint.h>
#include "ir2c.h"
#define FIB_MAX_NUM 15
int
a
=
0
,
b
=
1
;
int
i
;
int
main
(
int
argc
,
char
*
argv
)
{
int
prephitmp_42
;
int
prephitmp_41
;
int
prephitmp_40
;
uintptr_t
ivtmp_33
;
int
prephitmp_18
;
mainbb_2:
// # PRED: ENTRY [100.0%] (fallthru,exec)
prephitmp_41
=
b
;
prephitmp_40
=
a
;
ivtmp_33
=
0
;
// # SUCC: 3 [100.0%] (fallthru,exec)
mainbb_3:
// # PRED: 5 [100.0%] (fallthru) 2 [100.0%] (fallthru,exec)
prephitmp_18
=
prephitmp_40
+
prephitmp_41
;
ivtmp_33
=
ivtmp_33
+
1
;
if
(
ivtmp_33
!=
98
)
goto
mainbb_5
;
else
goto
mainbb_6
;
// # SUCC: 5 [91.0%] (dfs_back,true,exec) 6 [9.0%] (false,exec)
mainbb_5:
// # PRED: 3 [91.0%] (dfs_back,true,exec)
prephitmp_40
=
prephitmp_41
;
prephitmp_41
=
prephitmp_18
;
goto
mainbb_3
;
// # SUCC: 3 [100.0%] (fallthru)
mainbb_6:
// # PRED: 3 [9.0%] (false,exec)
prephitmp_42
=
prephitmp_18
;
// # SUCC: 4 [100.0%] (fallthru)
mainbb_4:
// # PRED: 6 [100.0%] (fallthru)
b
=
prephitmp_18
;
a
=
prephitmp_41
;
i
=
101
;
return
prephitmp_42
;
// # SUCC: EXIT [100.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