From 1d20bbd6a6ebc7ebe464cba72b9ea6b0e3697f3c Mon Sep 17 00:00:00 2001 From: David Monniaux Date: Fri, 8 Mar 2019 21:06:43 +0100 Subject: code qui plante --- test/monniaux/frame_pointer/Makefile | 13 +++++++++++++ test/monniaux/frame_pointer/a.c | 9 +++++++++ test/monniaux/frame_pointer/b.c | 11 +++++++++++ 3 files changed, 33 insertions(+) create mode 100644 test/monniaux/frame_pointer/Makefile create mode 100644 test/monniaux/frame_pointer/a.c create mode 100644 test/monniaux/frame_pointer/b.c (limited to 'test/monniaux/frame_pointer') diff --git a/test/monniaux/frame_pointer/Makefile b/test/monniaux/frame_pointer/Makefile new file mode 100644 index 00000000..15ca87e0 --- /dev/null +++ b/test/monniaux/frame_pointer/Makefile @@ -0,0 +1,13 @@ +whole : a.o b.o + ../../../ccomp $+ -o $@ + +a.o : a.c + k1-mbr-gcc -std=c99 -Wall -c $< + +b.o : b.c + ../../../ccomp -Wall -Wno-c11-extensions -c $< + +clean: + -rm -f a.o b.o whole + +.PHONY: clean diff --git a/test/monniaux/frame_pointer/a.c b/test/monniaux/frame_pointer/a.c new file mode 100644 index 00000000..644ccc9b --- /dev/null +++ b/test/monniaux/frame_pointer/a.c @@ -0,0 +1,9 @@ +extern unsigned get_size(void); +extern void print_array(unsigned n, const int *t); + +int main() { + unsigned n = get_size(); + int tab[n]; + for(unsigned i=0; i + +unsigned get_size(void) { + return 12; +} + +void print_array(unsigned n, const int *t) { + for(unsigned i=0; i Date: Sat, 9 Mar 2019 12:00:33 +0100 Subject: store the assembly source code as well --- test/monniaux/frame_pointer/Makefile | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'test/monniaux/frame_pointer') diff --git a/test/monniaux/frame_pointer/Makefile b/test/monniaux/frame_pointer/Makefile index 15ca87e0..e10d9bd3 100644 --- a/test/monniaux/frame_pointer/Makefile +++ b/test/monniaux/frame_pointer/Makefile @@ -1,13 +1,16 @@ whole : a.o b.o ../../../ccomp $+ -o $@ -a.o : a.c - k1-mbr-gcc -std=c99 -Wall -c $< +a.s : a.c + k1-mbr-gcc -std=c99 -Wall -S $< -b.o : b.c - ../../../ccomp -Wall -Wno-c11-extensions -c $< +b.s : b.c + ../../../ccomp -Wall -Wno-c11-extensions -S $< + +%.o : %.s + k1-mbr-gcc -c $< clean: - -rm -f a.o b.o whole + -rm -f a.o b.o a.s b.s whole .PHONY: clean -- cgit From a789b94e986375a713263d7d7584ceaac01084f2 Mon Sep 17 00:00:00 2001 From: David Monniaux Date: Tue, 28 May 2019 15:13:46 +0200 Subject: adaptation pour k1c-cos --- test/monniaux/frame_pointer/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/monniaux/frame_pointer') diff --git a/test/monniaux/frame_pointer/Makefile b/test/monniaux/frame_pointer/Makefile index e10d9bd3..ff4b187d 100644 --- a/test/monniaux/frame_pointer/Makefile +++ b/test/monniaux/frame_pointer/Makefile @@ -2,13 +2,13 @@ whole : a.o b.o ../../../ccomp $+ -o $@ a.s : a.c - k1-mbr-gcc -std=c99 -Wall -S $< + k1-cos-gcc -std=c99 -Wall -S $< b.s : b.c ../../../ccomp -Wall -Wno-c11-extensions -S $< %.o : %.s - k1-mbr-gcc -c $< + k1-cos-gcc -c $< clean: -rm -f a.o b.o a.s b.s whole -- cgit