tccgen.c:
- cleanup __builtin_... stuff
- merge __attribute((alias("sym"))) with __asm__("sym")
    Now one cannot have both, however for alias underscores are
    added if enabled.  For __asm__ they aren't.
tccpp.c:
- extend tcc_predefs accordingly.  Was generated with
  'cd tests/misc && tcc -run c2str.c tcc_predef.h tcc_predefs'
xxx-gen.c:
- move bcheck setjmp test to tccgen.c:gbound_args()
i386-gen.c:
- create win32 compatible stack space for big structures
tcctest.c:
- some cleanup + nicer output
		
	
			
		
			
				
	
	
		
			70 lines
		
	
	
	
		
			2.3 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			70 lines
		
	
	
	
		
			2.3 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
#include <stdio.h>
 | 
						|
 | 
						|
/* This was first introduced to test the ARM port */
 | 
						|
 | 
						|
#define UINT_MAX ((unsigned) -1)
 | 
						|
 | 
						|
int main()
 | 
						|
{
 | 
						|
    printf("18/21=%u\n", 18/21);
 | 
						|
    printf("18%%21=%u\n", 18%21);
 | 
						|
    printf("41/21=%u\n", 41/21);
 | 
						|
    printf("41%%21=%u\n", 41%21);
 | 
						|
    printf("42/21=%u\n", 42/21);
 | 
						|
    printf("42%%21=%u\n", 42%21);
 | 
						|
    printf("43/21=%u\n", 43/21);
 | 
						|
    printf("43%%21=%u\n", 43%21);
 | 
						|
    printf("126/21=%u\n", 126/21);
 | 
						|
    printf("126%%21=%u\n", 126%21);
 | 
						|
    printf("131/21=%u\n", 131/21);
 | 
						|
    printf("131%%21=%u\n", 131%21);
 | 
						|
    printf("(UINT_MAX/2+3)/2=%u\n", (UINT_MAX/2+3)/2);
 | 
						|
    printf("(UINT_MAX/2+3)%%2=%u\n", (UINT_MAX/2+3)%2);
 | 
						|
 | 
						|
    printf("18/-21=%u\n", 18/-21);
 | 
						|
    printf("18%%-21=%u\n", 18%-21);
 | 
						|
    printf("41/-21=%u\n", 41/-21);
 | 
						|
    printf("41%%-21=%u\n", 41%-21);
 | 
						|
    printf("42/-21=%u\n", 42/-21);
 | 
						|
    printf("42%%-21=%u\n", 42%-21);
 | 
						|
    printf("43/-21=%u\n", 43/-21);
 | 
						|
    printf("43%%-21=%u\n", 43%-21);
 | 
						|
    printf("126/-21=%u\n", 126/-21);
 | 
						|
    printf("126%%-21=%u\n", 126%-21);
 | 
						|
    printf("131/-21=%u\n", 131/-21);
 | 
						|
    printf("131%%-21=%u\n", 131%-21);
 | 
						|
    printf("(UINT_MAX/2+3)/-2=%u\n", (UINT_MAX/2+3)/-2);
 | 
						|
    printf("(UINT_MAX/2+3)%%-2=%u\n", (UINT_MAX/2+3)%-2);
 | 
						|
 | 
						|
    printf("-18/21=%u\n", -18/21);
 | 
						|
    printf("-18%%21=%u\n", -18%21);
 | 
						|
    printf("-41/21=%u\n", -41/21);
 | 
						|
    printf("-41%%21=%u\n", -41%21);
 | 
						|
    printf("-42/21=%u\n", -42/21);
 | 
						|
    printf("-42%%21=%u\n", -42%21);
 | 
						|
    printf("-43/21=%u\n", -43/21);
 | 
						|
    printf("-43%%21=%u\n", -43%21);
 | 
						|
    printf("-126/21=%u\n", -126/21);
 | 
						|
    printf("-126%%21=%u\n", -126%21);
 | 
						|
    printf("-131/21=%u\n", -131/21);
 | 
						|
    printf("-131%%21=%u\n", -131%21);
 | 
						|
    printf("-(UINT_MAX/2+3)/2=%u\n", (0-(UINT_MAX/2+3))/2);
 | 
						|
    printf("-(UINT_MAX/2+3)%%2=%u\n", (0-(UINT_MAX/2+3))%2);
 | 
						|
 | 
						|
    printf("-18/-21=%u\n", -18/-21);
 | 
						|
    printf("-18%%-21=%u\n", -18%-21);
 | 
						|
    printf("-41/-21=%u\n", -41/-21);
 | 
						|
    printf("-41%%-21=%u\n", -41%-21);
 | 
						|
    printf("-42/-21=%u\n", -42/-21);
 | 
						|
    printf("-42%%-21=%u\n", -42%-21);
 | 
						|
    printf("-43/-21=%u\n", -43/-21);
 | 
						|
    printf("-43%%-21=%u\n", -43%-21);
 | 
						|
    printf("-126/-21=%u\n", -126/-21);
 | 
						|
    printf("-126%%-21=%u\n", -126%-21);
 | 
						|
    printf("-131/-21=%u\n", -131/-21);
 | 
						|
    printf("-131%%-21=%u\n", -131%-21);
 | 
						|
    printf("-(UINT_MAX/2+3)/-2=%u\n", (0-(UINT_MAX/2+3))/-2);
 | 
						|
    printf("-(UINT_MAX/2+3)%%-2=%u\n", (0-(UINT_MAX/2+3))%-2);
 | 
						|
 | 
						|
    return 0;
 | 
						|
}
 |