From 479aacd0254605942a3f48c3b8053af4d07f0f6c Mon Sep 17 00:00:00 2001 From: Cyril SIX Date: Mon, 21 May 2018 16:34:36 +0200 Subject: MPPA - Added modulo and division 64 bits. Non certified 32 bits version are not yet there. Right now the code is directly from libgcc, compiled with k1-gcc because of builtins. --- test/mppa/Makefile | 2 +- test/mppa/general/udivd.c | 8 ++++++++ test/mppa/general/umodd.c | 8 ++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 test/mppa/general/udivd.c create mode 100644 test/mppa/general/umodd.c (limited to 'test/mppa') diff --git a/test/mppa/Makefile b/test/mppa/Makefile index ffea4c30..5b312475 100644 --- a/test/mppa/Makefile +++ b/test/mppa/Makefile @@ -17,7 +17,7 @@ nobin: $(ASM) $(DIR)/$(BINDIR)/%.bin: $(DIR)/$(ASMDIR)/%.s @mkdir -p $(@D) - k1-gcc $< -o $@ + ccomp $< -o $@ .SECONDARY: $(DIR)/$(ASMDIR)/%.s: $(DIR)/%.c $(CCOMP) diff --git a/test/mppa/general/udivd.c b/test/mppa/general/udivd.c new file mode 100644 index 00000000..03e103a6 --- /dev/null +++ b/test/mppa/general/udivd.c @@ -0,0 +1,8 @@ +#define TYPE unsigned long long + +int main(void){ + TYPE a = 6; + TYPE b = -4; + + return a/b; +} diff --git a/test/mppa/general/umodd.c b/test/mppa/general/umodd.c new file mode 100644 index 00000000..96d2b564 --- /dev/null +++ b/test/mppa/general/umodd.c @@ -0,0 +1,8 @@ +#define TYPE unsigned long long + +int main(void){ + TYPE a = 6; + TYPE b = -4; + + return a%b; +} -- cgit