Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CertiCompil
CompCert-KVX
Commits
5e35117f
Commit
5e35117f
authored
Apr 11, 2018
by
Cyril SIX
Browse files
MPPA - reorganized the test directory
parent
89a54eee
Changes
2
Hide whitespace changes
Inline
Side-by-side
test/mppa/Makefile
View file @
5e35117f
DIR
=
general
BINDIR
=
bin
ASMDIR
=
asm
TESTNAMES
=
simple call branch
for
forvar forvarl branchz branchzu
CCOMP
=
../../ccomp
TESTS
=
$(
addprefix
$(DIR)
/,
$(TESTNAMES)
)
ELF
=
$(
addsuffix
.bin,
$(TEST
S
)
)
TOK
=
$(
addsuffix
.tok,
$(TEST
S
)
)
ASM
=
$(
addsuffix
.s,
$(TEST
S
)
)
#
TESTS=$(addprefix $(DIR)/,$(TESTNAMES))
ELF
=
$(
addprefix
$(DIR)
/
$(BINDIR)
/,
$(
addsuffix
.bin,
$(TEST
NAMES)
))
TOK
=
$(
addprefix
$(DIR)
/
$(BINDIR)
/,
$(
addsuffix
.tok,
$(TEST
NAMES)
))
ASM
=
$(
addprefix
$(DIR)
/
$(ASMDIR)
/,
$(
addsuffix
.s,
$(TEST
NAMES)
))
DEBUG
:=
$(
if
$(DEBUG)
,
"-dall"
,
)
all
:
$(ELF)
nobin
:
$(ASM)
$(DIR)/%.bin
:
$(DIR)/%.s
$(DIR)/$(BINDIR)/%.bin
:
$(DIR)/$(ASMDIR)/%.s
@
mkdir
-p
$
(
@D
)
k1-gcc
$<
-o
$@
.SECONDARY
:
$(DIR)/%.s
:
$(DIR)/%.c $(CCOMP)
$(DIR)/$(ASMDIR)/%.s
:
$(DIR)/%.c $(CCOMP)
@
mkdir
-p
$
(
@D
)
ccomp
$(DEBUG)
-O0
-v
-S
$<
-o
$@
$(DIR)/%.tok
:
$(DIR)/%.bin
$(DIR)/$(BINDIR)/%.tok
:
$(DIR)/$(BINDIR)/%.bin
@
mkdir
-p
$
(
@D
)
@
bash check.sh
$<
$@
.PHONY
:
FORCE
...
...
@@ -39,8 +44,8 @@ clean:
rm
-f
$(DIR)
/
*
.mach
rm
-f
$(DIR)
/
*
.parsed.c
rm
-f
$(DIR)
/
*
.rtl.?
rm
-f
$(DIR)
/
*
.s
rm
-f
$(DIR)
/
*
.
tok
rm
-f
$(DIR)
/
$(ASMDIR)
/
*
.s
rm
-f
$(DIR)
/
$(BINDIR)
/
*
.[bin,
tok
]
rm
-f
$(DIR)
/output/
*
.out
rm
-rf
$(DIR)
/profile/
rm
-f
$(ELF)
test/mppa/check.sh
View file @
5e35117f
...
...
@@ -11,11 +11,12 @@ fi
dir
=
"
$(
dirname
$elffile
)
"
elf
=
"
$(
basename
$elffile
)
"
exp
=
"
$dir
/output/
$elf
.exp"
out
=
"
$dir
/output/
$elf
.out"
exp
=
"
$dir
/../output/
$elf
.exp"
out
=
"
$dir
/../output/
$elf
.out"
if
[
!
-f
$exp
]
;
then
>
&2
echo
"ERROR:
$exp
not found"
shift
;
continue
exit
fi
k1-cluster
--
$elffile
>
$out
...
...
@@ -24,7 +25,6 @@ echo $? >> $out
if
!
diff
$exp
$out
;
then
>
&2
echo
"ERROR:
$exp
and
$out
differ"
exit
#shift; continue
fi
echo
"PASSED:
$elf
"
...
...
Write
Preview
Supports
Markdown
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