changeset 154:39aef2fd0f5a

merge
author anatofuz
date Mon, 25 May 2020 08:06:15 +0900
parents 12726f63b2b6 (current diff) 2eca1fb48fa2 (diff)
children a4a7bdaf5ae6
files
diffstat 8 files changed, 21 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Mon May 25 08:05:49 2020 +0900
+++ b/.hgtags	Mon May 25 08:06:15 2020 +0900
@@ -1,3 +1,4 @@
 77e2b8dfacca7d714bc9daeb6169b88f9d7c35eb gcc-4.4.5
 b7f97abdc51746370aa15065311ea13e56c08d1f gcc-4.6-20100522
 4d6300120c296e398e8730ef2f5be373b75650ca cbc-gcc-4.6.0
+26042f4007d5487fc1026877098e2bcfc8092e36 current
--- a/CbC-examples/arg.c	Mon May 25 08:05:49 2020 +0900
+++ b/CbC-examples/arg.c	Mon May 25 08:06:15 2020 +0900
@@ -13,13 +13,13 @@
 void *exit_env;
 __code (*exit___code)();
 
-#ifndef __llvm__ 
+// #ifndef __llvm__ 
 __code carg2(int arg0,int arg1,int arg2,int arg3,int arg4,__code(*exit1)(int, void*),void *env);
 __code cargs(struct arg args0,__code exit1(int, void*),void *env);
 __code carg4(struct arg args0,struct arg args1,int i, int j,int k,int l);
 __code carg5(struct arg args0,struct arg args1,int i, int j,int k,int l);
 __code carg6(int i, int j,int k,int l,struct arg args0);
-#endif
+// #endif
 
 __code carg1(int arg0,int arg1,int arg2,int arg3,int arg4,__code(*exit1)(int, void*),void *env)
 {
--- a/CbC-examples/stack1.c	Mon May 25 08:05:49 2020 +0900
+++ b/CbC-examples/stack1.c	Mon May 25 08:06:15 2020 +0900
@@ -3,7 +3,9 @@
  */
 
 #include <stdio.h>
-#define NULL 0
+#include <stdlib.h>
+
+// #define NULL 0
 extern int printf(const char*, ...);
 
 extern void *malloc(size_t);
@@ -30,7 +32,7 @@
     goto (* ((struct cont_save *)sp)->ret)(i+4,sp);
 }
 
-__code __attribute__ ((fastcall)) f_g1(int j,void *sp) {  /* Continuation  */
+__code f_g1(int j,void *sp) {  /* Continuation  */
     int k;
     struct f_g0_save *c;
 
@@ -98,6 +100,8 @@
 	goto print(i,j,exit2,exit2env);
 }
 
+int main0( int ac, char *av[]);
+
 int main(int ac, char*av[]){
 	main0(ac,av);
 }
--- a/CbC-examples/test05.c	Mon May 25 08:05:49 2020 +0900
+++ b/CbC-examples/test05.c	Mon May 25 08:06:15 2020 +0900
@@ -1,4 +1,6 @@
 //#include<stdio.h>
+#include <stdlib.h>
+
 extern int printf(const char*, ...);
 #define dprint(f, args...) \
     printf("in %s: "f, __FUNCTION__, ## args)
--- a/CbC-examples/test_cs.c	Mon May 25 08:05:49 2020 +0900
+++ b/CbC-examples/test_cs.c	Mon May 25 08:06:15 2020 +0900
@@ -2,6 +2,7 @@
 //#include<stdlib.h>
 
 extern int printf(const char*, ...);
+extern     void exit(int status);
 
 __code cs_exit(int , double , char );
 __code cs1(int, int, int, int);
--- a/CbC-examples/test_para3.c	Mon May 25 08:05:49 2020 +0900
+++ b/CbC-examples/test_para3.c	Mon May 25 08:06:15 2020 +0900
@@ -49,9 +49,9 @@
 int function(){
 	struct abc A;
 	struct def B;
-	A.a = 10, A.b = 20.02, A.c = '\0', A.d = 0xad;
-	B.d = 30, B.f = 0xbf;
-	B.e.a = 50, B.e.b = 60.06, B.e.c = '\1', B.e.d = 0xed;
+	A.a = 10, A.b = 20.02, A.c = '\0', A.d = (void*)0xad;
+	B.d = 30, B.f = (void*)0xbf;
+	B.e.a = 50, B.e.b = 60.06, B.e.c = '\1', B.e.d = (void*)0xed;
 
 	printf("function  :\n");
 	print_abc(A);
@@ -65,9 +65,9 @@
 	struct abc A;
 	struct def B;
 	//int a=10, b=20, c=30, d=40, e=50, f=60, g=70;
-	A.a = 10, A.b = 20.02, A.c = '\0', A.d = 0xad;
-	B.d = 30, B.f = 0xbf;
-	B.e.a = 50, B.e.b = 60.06, B.e.c = '\1', B.e.d = 0xed;
+	A.a = 10, A.b = 20.02, A.c = '\0', A.d = (void*)0xad;
+	B.d = 30, B.f = (void*)0xbf;
+	B.e.a = 50, B.e.b = 60.06, B.e.c = '\1', B.e.d = (void*)0xed;
 
 	/*
 	printf("main    :\n");
--- a/CbC-examples/test_para4.c	Mon May 25 08:05:49 2020 +0900
+++ b/CbC-examples/test_para4.c	Mon May 25 08:06:15 2020 +0900
@@ -2,6 +2,7 @@
 //#include<stdlib.h>
 
 extern int printf(const char*, ...);
+extern     void exit(int status);
 
 #define DPRINT 1
 #define NOINLINE __attribute__((noinline))
--- a/CbC-examples/test_tree.c	Mon May 25 08:05:49 2020 +0900
+++ b/CbC-examples/test_tree.c	Mon May 25 08:06:15 2020 +0900
@@ -5,6 +5,8 @@
 __code cs(int , double , char );
 void testvoid(double a);
 int testint(double a);
+void test_goto(int a, int b, double c);
+__code test_goto1(int a, int b, double c);
 
 __code cs(int a, double b, char c){
 	printf("__code cs was called.\n");