Ignore:
Timestamp:
07/24/09 18:55:27 (3 years ago)
Author:
debrouxl
Message:

library:

  • use explicit register parameters for Sprite8/16/32, bsearch and qsort;
  • regenerate headers;
  • 2-byte optimization in Sprite8: shift count can be computed differently.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tigcc/include/C/stdlib.h

    r1307 r1360  
    4242extern short atoi(const char*)__ATTR_LIB_C__; 
    4343extern long atol(const char*)__ATTR_LIB_C__; 
    44 extern void *bsearch(const void*,const void*,short,short,compare_t)__ATTR_LIB_C__; 
     44extern void *bsearch(const void* asm("a0"),const void* asm("a1"),short asm("d0"),short asm("d1"),compare_t asm("a2"))__ATTR_LIB_ASM__; 
    4545#ifndef __HAVE_calloc 
    4646#define __HAVE_calloc 
     
    5858#define max(a,b) ({typeof(a) __a = (a); typeof(b) __b = (b); (__a > __b) ? __a : __b;}) 
    5959#define min(a,b) ({typeof(a) __a = (a); typeof(b) __b = (b); (__a < __b) ? __a : __b;}) 
    60 extern void qsort(void*,short,short,compare_t)__ATTR_LIB_C__; 
     60extern void qsort(void* asm("a0"),short asm("d0"),short asm("d1"),compare_t asm("a2"))__ATTR_LIB_ASM__; 
    6161extern short rand(void)__ATTR_LIB_ASM__; 
    6262#define random(x) ((short)((long)(unsigned short)rand()*(unsigned short)(x)/32768)) 
Note: See TracChangeset for help on using the changeset viewer.