Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 5974661 in mainline


Ignore:
Timestamp:
2011-06-19T17:54:08Z (11 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master
Children:
e4f8c77
Parents:
0ffbed9
Message:

Add a separate directory for each platform's external.{c,h}. Add mkext utility for generating those to the build.

Files:
16 added
4 edited
2 moved

Legend:

Unmodified
Added
Removed
  • boot/Makefile.common

    r0ffbed9 r5974661  
    140140        $(USPACE_PATH)/app/cc/cc \
    141141        $(USPACE_PATH)/app/ccom/ccom \
     142        $(USPACE_PATH)/app/ccom/mkext/cc_mkext \
    142143        $(USPACE_PATH)/app/cpp/cpp \
    143144        $(USPACE_PATH)/app/dltest/dltest \
  • uspace/Makefile

    r0ffbed9 r5974661  
    3939        app/cc \
    4040        app/ccom \
     41        app/ccom/mkext \
    4142        app/cpp \
    4243        app/edit \
  • uspace/app/pcc/cc/ccom/Makefile

    r0ffbed9 r5974661  
    3434DEFS = -Dmach_$(PLATFORM) -D__helenos__ -DPCC_DEBUG -DGCC_COMPAT -Dfree=free
    3535BINARY = ccom
    36 EXTRA_CLEAN = cgram.c cgram.h scan.c
     36EXTRA_CLEAN = cgram.c cgram.h scan.c external.c external.h
    3737
    3838POSIX_COMPAT = y
    3939
    40 # FIXME: I think external.{c,h} must be generated on the target system
     40# FIXME: external.{c,h} must be generated for each target system
    4141
    4242SOURCES = \
     
    7676        mv lex.yy.c scan.c
    7777
     78external.c external.h:
     79        ln -s arch/$(PLATFORM)/external.c external.c
     80        ln -s arch/$(PLATFORM)/external.h external.h
     81
    7882include $(USPACE_PREFIX)/Makefile.common
    7983
  • uspace/app/pcc/cc/ccom/arch/ia32/external.c

    • Property mode changed from 100644 to 100755
    r0ffbed9 r5974661  
    124124int permregs[] = { 3, 4, 5, -1 };
    125125bittype validregs[] = {
    126         0x7fffffff3f,
     126        0xffffff3f,
     127        0x0000007f,
    127128};
    128129static int amap[MAXREGS][NUMCLASS] = {
     
    196197        return 0x0;
    197198}
    198 static bittype ovlarr[MAXREGS][1] = {
    199 { 0x1f0301, },
    200 { 0x1e10c02, },
    201 { 0xe223004, },
    202 { 0x3244c008, },
    203 { 0x54880010, },
    204 { 0x69100020, },
    205 { 0x40, },
    206 { 0x80, },
    207 { 0x1f0101, },
    208 { 0x1f0201, },
    209 { 0x1e10402, },
    210 { 0x1e10802, },
    211 { 0xe221004, },
    212 { 0xe222004, },
    213 { 0x32444008, },
    214 { 0x32448008, },
    215 { 0x1ff0f03, },
    216 { 0xe3f3305, },
    217 { 0x325fc309, },
    218 { 0x549f0311, },
    219 { 0x691f0321, },
    220 { 0xfe33c06, },
    221 { 0x33e5cc0a, },
    222 { 0x55e90c12, },
    223 { 0x69f10c22, },
    224 { 0x3e66f00c, },
    225 { 0x5eaa3014, },
    226 { 0x6f323024, },
    227 { 0x76ccc018, },
    228 { 0x7b54c028, },
    229 { 0x7d980030, },
    230 { 0x80000000, },
    231 { 0x1,  },
    232 { 0x2,  },
    233 { 0x4,  },
    234 { 0x8,  },
    235 { 0x10,  },
    236 { 0x20,  },
    237 { 0x40,  },
     199static bittype ovlarr[MAXREGS][2] = {
     200{ 0x1f0301, 0x0, },
     201{ 0x1e10c02, 0x0, },
     202{ 0xe223004, 0x0, },
     203{ 0x3244c008, 0x0, },
     204{ 0x54880010, 0x0, },
     205{ 0x69100020, 0x0, },
     206{ 0x40, 0x0, },
     207{ 0x80, 0x0, },
     208{ 0x1f0101, 0x0, },
     209{ 0x1f0201, 0x0, },
     210{ 0x1e10402, 0x0, },
     211{ 0x1e10802, 0x0, },
     212{ 0xe221004, 0x0, },
     213{ 0xe222004, 0x0, },
     214{ 0x32444008, 0x0, },
     215{ 0x32448008, 0x0, },
     216{ 0x1ff0f03, 0x0, },
     217{ 0xe3f3305, 0x0, },
     218{ 0x325fc309, 0x0, },
     219{ 0x549f0311, 0x0, },
     220{ 0x691f0321, 0x0, },
     221{ 0xfe33c06, 0x0, },
     222{ 0x33e5cc0a, 0x0, },
     223{ 0x55e90c12, 0x0, },
     224{ 0x69f10c22, 0x0, },
     225{ 0x3e66f00c, 0x0, },
     226{ 0x5eaa3014, 0x0, },
     227{ 0x6f323024, 0x0, },
     228{ 0x76ccc018, 0x0, },
     229{ 0x7b54c028, 0x0, },
     230{ 0x7d980030, 0x0, },
     231{ 0x80000000, 0x0, },
     232{ 0x0, 0x1,  },
     233{ 0x0, 0x2,  },
     234{ 0x0, 0x4,  },
     235{ 0x0, 0x8,  },
     236{ 0x0, 0x10,  },
     237{ 0x0, 0x20,  },
     238{ 0x0, 0x40,  },
    238239};
    239240int
  • uspace/app/pcc/cc/ccom/arch/ia32/external.h

    • Property mode changed from 100644 to 100755
    r0ffbed9 r5974661  
    22#define _EXTERNAL_H_
    33#define MAXOPLEN 42
    4 #define NUMBITS 64
     4#define NUMBITS 32
    55#define BIT2BYTE(bits) ((((bits)+NUMBITS-1)/NUMBITS)*(NUMBITS/8))
    6 #define BITSET(arr, bit) (arr[bit/NUMBITS] |= ((long)1 << (bit & (NUMBITS-1))))
    7 #define BITCLEAR(arr, bit) (arr[bit/NUMBITS] &= ~((long)1 << (bit & (NUMBITS-1))))
    8 #define TESTBIT(arr, bit) (arr[bit/NUMBITS] & ((long)1 << (bit & (NUMBITS-1))))
    9 typedef long bittype;
     6#define BITSET(arr, bit) (arr[bit/NUMBITS] |= ((int)1 << (bit & (NUMBITS-1))))
     7#define BITCLEAR(arr, bit) (arr[bit/NUMBITS] &= ~((int)1 << (bit & (NUMBITS-1))))
     8#define TESTBIT(arr, bit) (arr[bit/NUMBITS] & ((int)1 << (bit & (NUMBITS-1))))
     9typedef int bittype;
    1010extern int tempregs[], permregs[];
    1111#define NTEMPREG 4
  • uspace/app/pcc/config.h

    r0ffbed9 r5974661  
    2727
    2828/* Define to 1 if printf supports C99 size specifiers */
    29 #define HAVE_C99_FORMAT 1
     29//#define HAVE_C99_FORMAT 1
    3030
    3131/* Define to 1 if your compiler supports C99 variadic macros */
Note: See TracChangeset for help on using the changeset viewer.