Index: uspace/app/pcc/cc/ccom/Makefile
===================================================================
--- uspace/app/pcc/cc/ccom/Makefile	(revision f48b637e784d7a891b9bca7b59a25dac35ea72b8)
+++ uspace/app/pcc/cc/ccom/Makefile	(revision e4f8c77d2f0ec68a5943a6b063aaa901dc22d1b4)
@@ -34,9 +34,9 @@
 DEFS = -Dmach_$(PLATFORM) -D__helenos__ -DPCC_DEBUG -DGCC_COMPAT -Dfree=free
 BINARY = ccom
-EXTRA_CLEAN = cgram.c cgram.h scan.c
+EXTRA_CLEAN = cgram.c cgram.h scan.c external.c external.h
 
 POSIX_COMPAT = y
 
-# FIXME: I think external.{c,h} must be generated on the target system
+# FIXME: external.{c,h} must be generated for each target system
 
 SOURCES = \
@@ -76,4 +76,8 @@
 	mv lex.yy.c scan.c
 
+external.c external.h:
+	ln -s arch/$(PLATFORM)/external.c external.c
+	ln -s arch/$(PLATFORM)/external.h external.h
+
 include $(USPACE_PREFIX)/Makefile.common
 
Index: uspace/app/pcc/cc/ccom/arch/abs32le/external.c
===================================================================
--- uspace/app/pcc/cc/ccom/arch/abs32le/external.c	(revision e4f8c77d2f0ec68a5943a6b063aaa901dc22d1b4)
+++ uspace/app/pcc/cc/ccom/arch/abs32le/external.c	(revision e4f8c77d2f0ec68a5943a6b063aaa901dc22d1b4)
@@ -0,0 +1,246 @@
+#include "pass2.h"
+
+// TODO: replace with file generated by ccom_mkext
+
+static int op0[] = { -1 };
+static int op1[] = { -1 };
+static int op2[] = { -1 };
+static int op3[] = { -1 };
+static int op4[] = { -1 };
+static int op5[] = { -1 };
+static int op6[] = { -1 };
+static int op7[] = { -1 };
+static int op8[] = { -1 };
+static int op9[] = { -1 };
+static int op10[] = { -1 };
+static int op11[] = { -1 };
+static int op12[] = { -1 };
+static int op13[] = { -1 };
+static int op14[] = { -1 };
+static int op15[] = { -1 };
+static int op16[] = { -1 };
+static int op17[] = { -1 };
+static int op18[] = { -1 };
+static int op19[] = { -1 };
+static int op20[] = { -1 };
+static int op21[] = { -1 };
+static int op22[] = { -1 };
+static int op23[] = { -1 };
+static int op24[] = { -1 };
+static int op25[] = { -1 };
+static int op26[] = { -1 };
+static int op27[] = { -1 };
+static int op28[] = { -1 };
+static int op29[] = { -1 };
+static int op30[] = { -1 };
+static int op31[] = { -1 };
+static int op32[] = { -1 };
+static int op33[] = { -1 };
+static int op34[] = { -1 };
+static int op35[] = { -1 };
+static int op36[] = { -1 };
+static int op37[] = { -1 };
+static int op38[] = { -1 };
+static int op39[] = { -1 };
+static int op40[] = { -1 };
+static int op41[] = { -1 };
+static int op42[] = { -1 };
+static int op43[] = { -1 };
+static int op44[] = { -1 };
+static int op45[] = { -1 };
+static int op46[] = { -1 };
+static int op47[] = { -1 };
+static int op48[] = { -1 };
+static int op49[] = { -1 };
+static int op50[] = { -1 };
+static int op51[] = { -1 };
+static int op52[] = { -1 };
+static int op53[] = { -1 };
+static int op54[] = { -1 };
+static int op55[] = { -1 };
+static int op56[] = { -1 };
+static int op57[] = { -1 };
+static int op58[] = { -1 };
+
+int *qtable[] = { 
+	op0,
+	op1,
+	op2,
+	op3,
+	op4,
+	op5,
+	op6,
+	op7,
+	op8,
+	op9,
+	op10,
+	op11,
+	op12,
+	op13,
+	op14,
+	op15,
+	op16,
+	op17,
+	op18,
+	op19,
+	op20,
+	op21,
+	op22,
+	op23,
+	op24,
+	op25,
+	op26,
+	op27,
+	op28,
+	op29,
+	op30,
+	op31,
+	op32,
+	op33,
+	op34,
+	op35,
+	op36,
+	op37,
+	op38,
+	op39,
+	op40,
+	op41,
+	op42,
+	op43,
+	op44,
+	op45,
+	op46,
+	op47,
+	op48,
+	op49,
+	op50,
+	op51,
+	op52,
+	op53,
+	op54,
+	op55,
+	op56,
+	op57,
+	op58,
+};
+int tempregs[] = { -1 };
+int permregs[] = { -1 };
+bittype validregs[] = {
+	0x7fffffffff,
+};
+static int amap[MAXREGS][NUMCLASS] = {
+	/* 0 */{ 0x0,0x0,0x0,0x0 },
+	/* 1 */{ 0x0,0x0,0x0,0x0 },
+	/* 2 */{ 0x0,0x0,0x0,0x0 },
+	/* 3 */{ 0x0,0x0,0x0,0x0 },
+	/* 4 */{ 0x0,0x0,0x0,0x0 },
+	/* 5 */{ 0x0,0x0,0x0,0x0 },
+	/* 6 */{ 0x0,0x0,0x0,0x0 },
+	/* 7 */{ 0x0,0x0,0x0,0x0 },
+	/* 8 */{ 0x0,0x0,0x0,0x0 },
+	/* 9 */{ 0x0,0x0,0x0,0x0 },
+	/* 10 */{ 0x0,0x0,0x0,0x0 },
+	/* 11 */{ 0x0,0x0,0x0,0x0 },
+	/* 12 */{ 0x0,0x0,0x0,0x0 },
+	/* 13 */{ 0x0,0x0,0x0,0x0 },
+	/* 14 */{ 0x0,0x0,0x0,0x0 },
+	/* 15 */{ 0x0,0x0,0x0,0x0 },
+	/* 16 */{ 0x0,0x0,0x0,0x0 },
+	/* 17 */{ 0x0,0x0,0x0,0x0 },
+	/* 18 */{ 0x0,0x0,0x0,0x0 },
+	/* 19 */{ 0x0,0x0,0x0,0x0 },
+	/* 20 */{ 0x0,0x0,0x0,0x0 },
+	/* 21 */{ 0x0,0x0,0x0,0x0 },
+	/* 22 */{ 0x0,0x0,0x0,0x0 },
+	/* 23 */{ 0x0,0x0,0x0,0x0 },
+	/* 24 */{ 0x0,0x0,0x0,0x0 },
+	/* 25 */{ 0x0,0x0,0x0,0x0 },
+	/* 26 */{ 0x0,0x0,0x0,0x0 },
+	/* 27 */{ 0x0,0x0,0x0,0x0 },
+	/* 28 */{ 0x0,0x0,0x0,0x0 },
+	/* 29 */{ 0x0,0x0,0x0,0x0 },
+	/* 30 */{ 0x0,0x0,0x0,0x0 },
+	/* 31 */{ 0x0,0x0,0x0,0x0 },
+	/* 32 */{ 0x0,0x0,0x0,0x0 },
+	/* 33 */{ 0x0,0x0,0x0,0x0 },
+	/* 34 */{ 0x0,0x0,0x0,0x0 },
+	/* 35 */{ 0x0,0x0,0x0,0x0 },
+	/* 36 */{ 0x0,0x0,0x0,0x0 },
+	/* 37 */{ 0x0,0x0,0x0,0x0 },
+	/* 38 */{ 0x0,0x0,0x0,0x0 }
+};
+int
+aliasmap(int class, int regnum)
+{
+	return amap[regnum][class-1];
+}
+static int rmap[NUMCLASS][15] = {
+	{ 0, 1, 2, 3, 4, 5, },
+	{ 8, 9, 10, 11, 12, 13, 14, 15, },
+	{ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, },
+	{ 31, 32, 33, 34, 35, 36, 37, 38, },
+};
+
+int
+color2reg(int color, int class)
+{
+	return rmap[class-1][color];
+}
+int regK[] = { 0, 0, 0, 0, 0, 0, 0, 0 };
+int
+classmask(int class)
+{
+	if(class == CLASSA) return 0x0;
+	if(class == CLASSB) return 0x0;
+	if(class == CLASSC) return 0x0;
+	if(class == CLASSD) return 0x0;
+	if(class == CLASSE) return 0x0;
+	if(class == CLASSF) return 0x0;
+	return 0x0;
+}
+static bittype ovlarr[MAXREGS][1] = {
+{ 0x1f0301,  },
+{ 0x1e10c02,  },
+{ 0xe223004,  },
+{ 0x3244c008,  },
+{ 0x54880010,  },
+{ 0x69100020,  },
+{ 0x40,  },
+{ 0x80,  },
+{ 0x1f0101,  },
+{ 0x1f0201,  },
+{ 0x1e10402,  },
+{ 0x1e10802,  },
+{ 0xe221004,  },
+{ 0xe222004,  },
+{ 0x32444008,  },
+{ 0x32448008,  },
+{ 0x1ff0f03,  },
+{ 0xe3f3305,  },
+{ 0x325fc309,  },
+{ 0x549f0311,  },
+{ 0x691f0321,  },
+{ 0xfe33c06,  },
+{ 0x33e5cc0a,  },
+{ 0x55e90c12,  },
+{ 0x69f10c22,  },
+{ 0x3e66f00c,  },
+{ 0x5eaa3014,  },
+{ 0x6f323024,  },
+{ 0x76ccc018,  },
+{ 0x7b54c028,  },
+{ 0x7d980030,  },
+{ 0x80000000,  },
+{ 0x1,  },
+{ 0x2,  },
+{ 0x4,  },
+{ 0x8,  },
+{ 0x10,  },
+{ 0x20,  },
+{ 0x40,  },
+};
+int
+interferes(int reg1, int reg2)
+{
+return (TESTBIT(ovlarr[reg1], reg2)) != 0;
+}
Index: uspace/app/pcc/cc/ccom/arch/abs32le/external.h
===================================================================
--- uspace/app/pcc/cc/ccom/arch/abs32le/external.h	(revision e4f8c77d2f0ec68a5943a6b063aaa901dc22d1b4)
+++ uspace/app/pcc/cc/ccom/arch/abs32le/external.h	(revision e4f8c77d2f0ec68a5943a6b063aaa901dc22d1b4)
@@ -0,0 +1,27 @@
+// TODO: replace with file generated by ccom_mkext
+
+#ifndef _EXTERNAL_H_
+#define _EXTERNAL_H_
+#define MAXOPLEN 0
+#define NUMBITS 32
+#define BIT2BYTE(bits) ((((bits)+NUMBITS-1)/NUMBITS)*(NUMBITS/8))
+#define BITSET(arr, bit) (arr[bit/NUMBITS] |= ((int)1 << (bit & (NUMBITS-1))))
+#define BITCLEAR(arr, bit) (arr[bit/NUMBITS] &= ~((int)1 << (bit & (NUMBITS-1))))
+#define TESTBIT(arr, bit) (arr[bit/NUMBITS] & ((int)1 << (bit & (NUMBITS-1))))
+typedef int bittype;
+extern int tempregs[], permregs[];
+#define NTEMPREG 0
+#define FREGS 0
+#define NPERMREG 0
+extern bittype validregs[];
+#define AREGCNT 0
+#define BREGCNT 0
+#define CREGCNT 0
+#define DREGCNT 0
+#define EREGCNT 0
+#define FREGCNT 0
+#define GREGCNT 0
+int aliasmap(int class, int regnum);
+int color2reg(int color, int class);
+int interferes(int reg1, int reg2);
+#endif /* _EXTERNAL_H_ */
Index: uspace/app/pcc/cc/ccom/arch/amd64/external.c
===================================================================
--- uspace/app/pcc/cc/ccom/arch/amd64/external.c	(revision e4f8c77d2f0ec68a5943a6b063aaa901dc22d1b4)
+++ uspace/app/pcc/cc/ccom/arch/amd64/external.c	(revision e4f8c77d2f0ec68a5943a6b063aaa901dc22d1b4)
@@ -0,0 +1,246 @@
+#include "pass2.h"
+
+// TODO: replace with file generated by ccom_mkext
+
+static int op0[] = { -1 };
+static int op1[] = { -1 };
+static int op2[] = { -1 };
+static int op3[] = { -1 };
+static int op4[] = { -1 };
+static int op5[] = { -1 };
+static int op6[] = { -1 };
+static int op7[] = { -1 };
+static int op8[] = { -1 };
+static int op9[] = { -1 };
+static int op10[] = { -1 };
+static int op11[] = { -1 };
+static int op12[] = { -1 };
+static int op13[] = { -1 };
+static int op14[] = { -1 };
+static int op15[] = { -1 };
+static int op16[] = { -1 };
+static int op17[] = { -1 };
+static int op18[] = { -1 };
+static int op19[] = { -1 };
+static int op20[] = { -1 };
+static int op21[] = { -1 };
+static int op22[] = { -1 };
+static int op23[] = { -1 };
+static int op24[] = { -1 };
+static int op25[] = { -1 };
+static int op26[] = { -1 };
+static int op27[] = { -1 };
+static int op28[] = { -1 };
+static int op29[] = { -1 };
+static int op30[] = { -1 };
+static int op31[] = { -1 };
+static int op32[] = { -1 };
+static int op33[] = { -1 };
+static int op34[] = { -1 };
+static int op35[] = { -1 };
+static int op36[] = { -1 };
+static int op37[] = { -1 };
+static int op38[] = { -1 };
+static int op39[] = { -1 };
+static int op40[] = { -1 };
+static int op41[] = { -1 };
+static int op42[] = { -1 };
+static int op43[] = { -1 };
+static int op44[] = { -1 };
+static int op45[] = { -1 };
+static int op46[] = { -1 };
+static int op47[] = { -1 };
+static int op48[] = { -1 };
+static int op49[] = { -1 };
+static int op50[] = { -1 };
+static int op51[] = { -1 };
+static int op52[] = { -1 };
+static int op53[] = { -1 };
+static int op54[] = { -1 };
+static int op55[] = { -1 };
+static int op56[] = { -1 };
+static int op57[] = { -1 };
+static int op58[] = { -1 };
+
+int *qtable[] = { 
+	op0,
+	op1,
+	op2,
+	op3,
+	op4,
+	op5,
+	op6,
+	op7,
+	op8,
+	op9,
+	op10,
+	op11,
+	op12,
+	op13,
+	op14,
+	op15,
+	op16,
+	op17,
+	op18,
+	op19,
+	op20,
+	op21,
+	op22,
+	op23,
+	op24,
+	op25,
+	op26,
+	op27,
+	op28,
+	op29,
+	op30,
+	op31,
+	op32,
+	op33,
+	op34,
+	op35,
+	op36,
+	op37,
+	op38,
+	op39,
+	op40,
+	op41,
+	op42,
+	op43,
+	op44,
+	op45,
+	op46,
+	op47,
+	op48,
+	op49,
+	op50,
+	op51,
+	op52,
+	op53,
+	op54,
+	op55,
+	op56,
+	op57,
+	op58,
+};
+int tempregs[] = { -1 };
+int permregs[] = { -1 };
+bittype validregs[] = {
+	0x7fffffffff,
+};
+static int amap[MAXREGS][NUMCLASS] = {
+	/* 0 */{ 0x0,0x0,0x0,0x0 },
+	/* 1 */{ 0x0,0x0,0x0,0x0 },
+	/* 2 */{ 0x0,0x0,0x0,0x0 },
+	/* 3 */{ 0x0,0x0,0x0,0x0 },
+	/* 4 */{ 0x0,0x0,0x0,0x0 },
+	/* 5 */{ 0x0,0x0,0x0,0x0 },
+	/* 6 */{ 0x0,0x0,0x0,0x0 },
+	/* 7 */{ 0x0,0x0,0x0,0x0 },
+	/* 8 */{ 0x0,0x0,0x0,0x0 },
+	/* 9 */{ 0x0,0x0,0x0,0x0 },
+	/* 10 */{ 0x0,0x0,0x0,0x0 },
+	/* 11 */{ 0x0,0x0,0x0,0x0 },
+	/* 12 */{ 0x0,0x0,0x0,0x0 },
+	/* 13 */{ 0x0,0x0,0x0,0x0 },
+	/* 14 */{ 0x0,0x0,0x0,0x0 },
+	/* 15 */{ 0x0,0x0,0x0,0x0 },
+	/* 16 */{ 0x0,0x0,0x0,0x0 },
+	/* 17 */{ 0x0,0x0,0x0,0x0 },
+	/* 18 */{ 0x0,0x0,0x0,0x0 },
+	/* 19 */{ 0x0,0x0,0x0,0x0 },
+	/* 20 */{ 0x0,0x0,0x0,0x0 },
+	/* 21 */{ 0x0,0x0,0x0,0x0 },
+	/* 22 */{ 0x0,0x0,0x0,0x0 },
+	/* 23 */{ 0x0,0x0,0x0,0x0 },
+	/* 24 */{ 0x0,0x0,0x0,0x0 },
+	/* 25 */{ 0x0,0x0,0x0,0x0 },
+	/* 26 */{ 0x0,0x0,0x0,0x0 },
+	/* 27 */{ 0x0,0x0,0x0,0x0 },
+	/* 28 */{ 0x0,0x0,0x0,0x0 },
+	/* 29 */{ 0x0,0x0,0x0,0x0 },
+	/* 30 */{ 0x0,0x0,0x0,0x0 },
+	/* 31 */{ 0x0,0x0,0x0,0x0 },
+	/* 32 */{ 0x0,0x0,0x0,0x0 },
+	/* 33 */{ 0x0,0x0,0x0,0x0 },
+	/* 34 */{ 0x0,0x0,0x0,0x0 },
+	/* 35 */{ 0x0,0x0,0x0,0x0 },
+	/* 36 */{ 0x0,0x0,0x0,0x0 },
+	/* 37 */{ 0x0,0x0,0x0,0x0 },
+	/* 38 */{ 0x0,0x0,0x0,0x0 }
+};
+int
+aliasmap(int class, int regnum)
+{
+	return amap[regnum][class-1];
+}
+static int rmap[NUMCLASS][15] = {
+	{ 0, 1, 2, 3, 4, 5, },
+	{ 8, 9, 10, 11, 12, 13, 14, 15, },
+	{ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, },
+	{ 31, 32, 33, 34, 35, 36, 37, 38, },
+};
+
+int
+color2reg(int color, int class)
+{
+	return rmap[class-1][color];
+}
+int regK[] = { 0, 0, 0, 0, 0, 0, 0, 0 };
+int
+classmask(int class)
+{
+	if(class == CLASSA) return 0x0;
+	if(class == CLASSB) return 0x0;
+	if(class == CLASSC) return 0x0;
+	if(class == CLASSD) return 0x0;
+	if(class == CLASSE) return 0x0;
+	if(class == CLASSF) return 0x0;
+	return 0x0;
+}
+static bittype ovlarr[MAXREGS][1] = {
+{ 0x1f0301,  },
+{ 0x1e10c02,  },
+{ 0xe223004,  },
+{ 0x3244c008,  },
+{ 0x54880010,  },
+{ 0x69100020,  },
+{ 0x40,  },
+{ 0x80,  },
+{ 0x1f0101,  },
+{ 0x1f0201,  },
+{ 0x1e10402,  },
+{ 0x1e10802,  },
+{ 0xe221004,  },
+{ 0xe222004,  },
+{ 0x32444008,  },
+{ 0x32448008,  },
+{ 0x1ff0f03,  },
+{ 0xe3f3305,  },
+{ 0x325fc309,  },
+{ 0x549f0311,  },
+{ 0x691f0321,  },
+{ 0xfe33c06,  },
+{ 0x33e5cc0a,  },
+{ 0x55e90c12,  },
+{ 0x69f10c22,  },
+{ 0x3e66f00c,  },
+{ 0x5eaa3014,  },
+{ 0x6f323024,  },
+{ 0x76ccc018,  },
+{ 0x7b54c028,  },
+{ 0x7d980030,  },
+{ 0x80000000,  },
+{ 0x1,  },
+{ 0x2,  },
+{ 0x4,  },
+{ 0x8,  },
+{ 0x10,  },
+{ 0x20,  },
+{ 0x40,  },
+};
+int
+interferes(int reg1, int reg2)
+{
+return (TESTBIT(ovlarr[reg1], reg2)) != 0;
+}
Index: uspace/app/pcc/cc/ccom/arch/amd64/external.h
===================================================================
--- uspace/app/pcc/cc/ccom/arch/amd64/external.h	(revision e4f8c77d2f0ec68a5943a6b063aaa901dc22d1b4)
+++ uspace/app/pcc/cc/ccom/arch/amd64/external.h	(revision e4f8c77d2f0ec68a5943a6b063aaa901dc22d1b4)
@@ -0,0 +1,27 @@
+// TODO: replace with file generated by ccom_mkext
+
+#ifndef _EXTERNAL_H_
+#define _EXTERNAL_H_
+#define MAXOPLEN 0
+#define NUMBITS 32
+#define BIT2BYTE(bits) ((((bits)+NUMBITS-1)/NUMBITS)*(NUMBITS/8))
+#define BITSET(arr, bit) (arr[bit/NUMBITS] |= ((int)1 << (bit & (NUMBITS-1))))
+#define BITCLEAR(arr, bit) (arr[bit/NUMBITS] &= ~((int)1 << (bit & (NUMBITS-1))))
+#define TESTBIT(arr, bit) (arr[bit/NUMBITS] & ((int)1 << (bit & (NUMBITS-1))))
+typedef int bittype;
+extern int tempregs[], permregs[];
+#define NTEMPREG 0
+#define FREGS 0
+#define NPERMREG 0
+extern bittype validregs[];
+#define AREGCNT 0
+#define BREGCNT 0
+#define CREGCNT 0
+#define DREGCNT 0
+#define EREGCNT 0
+#define FREGCNT 0
+#define GREGCNT 0
+int aliasmap(int class, int regnum);
+int color2reg(int color, int class);
+int interferes(int reg1, int reg2);
+#endif /* _EXTERNAL_H_ */
Index: uspace/app/pcc/cc/ccom/arch/arm32/external.c
===================================================================
--- uspace/app/pcc/cc/ccom/arch/arm32/external.c	(revision e4f8c77d2f0ec68a5943a6b063aaa901dc22d1b4)
+++ uspace/app/pcc/cc/ccom/arch/arm32/external.c	(revision e4f8c77d2f0ec68a5943a6b063aaa901dc22d1b4)
@@ -0,0 +1,246 @@
+#include "pass2.h"
+
+// TODO: replace with file generated by ccom_mkext
+
+static int op0[] = { -1 };
+static int op1[] = { -1 };
+static int op2[] = { -1 };
+static int op3[] = { -1 };
+static int op4[] = { -1 };
+static int op5[] = { -1 };
+static int op6[] = { -1 };
+static int op7[] = { -1 };
+static int op8[] = { -1 };
+static int op9[] = { -1 };
+static int op10[] = { -1 };
+static int op11[] = { -1 };
+static int op12[] = { -1 };
+static int op13[] = { -1 };
+static int op14[] = { -1 };
+static int op15[] = { -1 };
+static int op16[] = { -1 };
+static int op17[] = { -1 };
+static int op18[] = { -1 };
+static int op19[] = { -1 };
+static int op20[] = { -1 };
+static int op21[] = { -1 };
+static int op22[] = { -1 };
+static int op23[] = { -1 };
+static int op24[] = { -1 };
+static int op25[] = { -1 };
+static int op26[] = { -1 };
+static int op27[] = { -1 };
+static int op28[] = { -1 };
+static int op29[] = { -1 };
+static int op30[] = { -1 };
+static int op31[] = { -1 };
+static int op32[] = { -1 };
+static int op33[] = { -1 };
+static int op34[] = { -1 };
+static int op35[] = { -1 };
+static int op36[] = { -1 };
+static int op37[] = { -1 };
+static int op38[] = { -1 };
+static int op39[] = { -1 };
+static int op40[] = { -1 };
+static int op41[] = { -1 };
+static int op42[] = { -1 };
+static int op43[] = { -1 };
+static int op44[] = { -1 };
+static int op45[] = { -1 };
+static int op46[] = { -1 };
+static int op47[] = { -1 };
+static int op48[] = { -1 };
+static int op49[] = { -1 };
+static int op50[] = { -1 };
+static int op51[] = { -1 };
+static int op52[] = { -1 };
+static int op53[] = { -1 };
+static int op54[] = { -1 };
+static int op55[] = { -1 };
+static int op56[] = { -1 };
+static int op57[] = { -1 };
+static int op58[] = { -1 };
+
+int *qtable[] = { 
+	op0,
+	op1,
+	op2,
+	op3,
+	op4,
+	op5,
+	op6,
+	op7,
+	op8,
+	op9,
+	op10,
+	op11,
+	op12,
+	op13,
+	op14,
+	op15,
+	op16,
+	op17,
+	op18,
+	op19,
+	op20,
+	op21,
+	op22,
+	op23,
+	op24,
+	op25,
+	op26,
+	op27,
+	op28,
+	op29,
+	op30,
+	op31,
+	op32,
+	op33,
+	op34,
+	op35,
+	op36,
+	op37,
+	op38,
+	op39,
+	op40,
+	op41,
+	op42,
+	op43,
+	op44,
+	op45,
+	op46,
+	op47,
+	op48,
+	op49,
+	op50,
+	op51,
+	op52,
+	op53,
+	op54,
+	op55,
+	op56,
+	op57,
+	op58,
+};
+int tempregs[] = { -1 };
+int permregs[] = { -1 };
+bittype validregs[] = {
+	0x7fffffffff,
+};
+static int amap[MAXREGS][NUMCLASS] = {
+	/* 0 */{ 0x0,0x0,0x0,0x0 },
+	/* 1 */{ 0x0,0x0,0x0,0x0 },
+	/* 2 */{ 0x0,0x0,0x0,0x0 },
+	/* 3 */{ 0x0,0x0,0x0,0x0 },
+	/* 4 */{ 0x0,0x0,0x0,0x0 },
+	/* 5 */{ 0x0,0x0,0x0,0x0 },
+	/* 6 */{ 0x0,0x0,0x0,0x0 },
+	/* 7 */{ 0x0,0x0,0x0,0x0 },
+	/* 8 */{ 0x0,0x0,0x0,0x0 },
+	/* 9 */{ 0x0,0x0,0x0,0x0 },
+	/* 10 */{ 0x0,0x0,0x0,0x0 },
+	/* 11 */{ 0x0,0x0,0x0,0x0 },
+	/* 12 */{ 0x0,0x0,0x0,0x0 },
+	/* 13 */{ 0x0,0x0,0x0,0x0 },
+	/* 14 */{ 0x0,0x0,0x0,0x0 },
+	/* 15 */{ 0x0,0x0,0x0,0x0 },
+	/* 16 */{ 0x0,0x0,0x0,0x0 },
+	/* 17 */{ 0x0,0x0,0x0,0x0 },
+	/* 18 */{ 0x0,0x0,0x0,0x0 },
+	/* 19 */{ 0x0,0x0,0x0,0x0 },
+	/* 20 */{ 0x0,0x0,0x0,0x0 },
+	/* 21 */{ 0x0,0x0,0x0,0x0 },
+	/* 22 */{ 0x0,0x0,0x0,0x0 },
+	/* 23 */{ 0x0,0x0,0x0,0x0 },
+	/* 24 */{ 0x0,0x0,0x0,0x0 },
+	/* 25 */{ 0x0,0x0,0x0,0x0 },
+	/* 26 */{ 0x0,0x0,0x0,0x0 },
+	/* 27 */{ 0x0,0x0,0x0,0x0 },
+	/* 28 */{ 0x0,0x0,0x0,0x0 },
+	/* 29 */{ 0x0,0x0,0x0,0x0 },
+	/* 30 */{ 0x0,0x0,0x0,0x0 },
+	/* 31 */{ 0x0,0x0,0x0,0x0 },
+	/* 32 */{ 0x0,0x0,0x0,0x0 },
+	/* 33 */{ 0x0,0x0,0x0,0x0 },
+	/* 34 */{ 0x0,0x0,0x0,0x0 },
+	/* 35 */{ 0x0,0x0,0x0,0x0 },
+	/* 36 */{ 0x0,0x0,0x0,0x0 },
+	/* 37 */{ 0x0,0x0,0x0,0x0 },
+	/* 38 */{ 0x0,0x0,0x0,0x0 }
+};
+int
+aliasmap(int class, int regnum)
+{
+	return amap[regnum][class-1];
+}
+static int rmap[NUMCLASS][15] = {
+	{ 0, 1, 2, 3, 4, 5, },
+	{ 8, 9, 10, 11, 12, 13, 14, 15, },
+	{ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, },
+	{ 31, 32, 33, 34, 35, 36, 37, 38, },
+};
+
+int
+color2reg(int color, int class)
+{
+	return rmap[class-1][color];
+}
+int regK[] = { 0, 0, 0, 0, 0, 0, 0, 0 };
+int
+classmask(int class)
+{
+	if(class == CLASSA) return 0x0;
+	if(class == CLASSB) return 0x0;
+	if(class == CLASSC) return 0x0;
+	if(class == CLASSD) return 0x0;
+	if(class == CLASSE) return 0x0;
+	if(class == CLASSF) return 0x0;
+	return 0x0;
+}
+static bittype ovlarr[MAXREGS][1] = {
+{ 0x1f0301,  },
+{ 0x1e10c02,  },
+{ 0xe223004,  },
+{ 0x3244c008,  },
+{ 0x54880010,  },
+{ 0x69100020,  },
+{ 0x40,  },
+{ 0x80,  },
+{ 0x1f0101,  },
+{ 0x1f0201,  },
+{ 0x1e10402,  },
+{ 0x1e10802,  },
+{ 0xe221004,  },
+{ 0xe222004,  },
+{ 0x32444008,  },
+{ 0x32448008,  },
+{ 0x1ff0f03,  },
+{ 0xe3f3305,  },
+{ 0x325fc309,  },
+{ 0x549f0311,  },
+{ 0x691f0321,  },
+{ 0xfe33c06,  },
+{ 0x33e5cc0a,  },
+{ 0x55e90c12,  },
+{ 0x69f10c22,  },
+{ 0x3e66f00c,  },
+{ 0x5eaa3014,  },
+{ 0x6f323024,  },
+{ 0x76ccc018,  },
+{ 0x7b54c028,  },
+{ 0x7d980030,  },
+{ 0x80000000,  },
+{ 0x1,  },
+{ 0x2,  },
+{ 0x4,  },
+{ 0x8,  },
+{ 0x10,  },
+{ 0x20,  },
+{ 0x40,  },
+};
+int
+interferes(int reg1, int reg2)
+{
+return (TESTBIT(ovlarr[reg1], reg2)) != 0;
+}
Index: uspace/app/pcc/cc/ccom/arch/arm32/external.h
===================================================================
--- uspace/app/pcc/cc/ccom/arch/arm32/external.h	(revision e4f8c77d2f0ec68a5943a6b063aaa901dc22d1b4)
+++ uspace/app/pcc/cc/ccom/arch/arm32/external.h	(revision e4f8c77d2f0ec68a5943a6b063aaa901dc22d1b4)
@@ -0,0 +1,27 @@
+// TODO: replace with file generated by ccom_mkext
+
+#ifndef _EXTERNAL_H_
+#define _EXTERNAL_H_
+#define MAXOPLEN 0
+#define NUMBITS 32
+#define BIT2BYTE(bits) ((((bits)+NUMBITS-1)/NUMBITS)*(NUMBITS/8))
+#define BITSET(arr, bit) (arr[bit/NUMBITS] |= ((int)1 << (bit & (NUMBITS-1))))
+#define BITCLEAR(arr, bit) (arr[bit/NUMBITS] &= ~((int)1 << (bit & (NUMBITS-1))))
+#define TESTBIT(arr, bit) (arr[bit/NUMBITS] & ((int)1 << (bit & (NUMBITS-1))))
+typedef int bittype;
+extern int tempregs[], permregs[];
+#define NTEMPREG 0
+#define FREGS 0
+#define NPERMREG 0
+extern bittype validregs[];
+#define AREGCNT 0
+#define BREGCNT 0
+#define CREGCNT 0
+#define DREGCNT 0
+#define EREGCNT 0
+#define FREGCNT 0
+#define GREGCNT 0
+int aliasmap(int class, int regnum);
+int color2reg(int color, int class);
+int interferes(int reg1, int reg2);
+#endif /* _EXTERNAL_H_ */
Index: uspace/app/pcc/cc/ccom/arch/ia32/external.c
===================================================================
--- uspace/app/pcc/cc/ccom/arch/ia32/external.c	(revision e4f8c77d2f0ec68a5943a6b063aaa901dc22d1b4)
+++ uspace/app/pcc/cc/ccom/arch/ia32/external.c	(revision e4f8c77d2f0ec68a5943a6b063aaa901dc22d1b4)
@@ -0,0 +1,244 @@
+#include "pass2.h"
+static int op0[] = { -1 };
+static int op1[] = { -1 };
+static int op2[] = { 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 231, 233, -1 };
+static int op3[] = { -1 };
+static int op4[] = { 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 231, 233, -1 };
+static int op5[] = { 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 231, 233, -1 };
+static int op6[] = { 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 231, 233, -1 };
+static int op7[] = { 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 231, 233, -1 };
+static int op8[] = { 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 231, 233, -1 };
+static int op9[] = { 232, 233, -1 };
+static int op10[] = { 68, 69, 70, 71, 72, 73, 74, 75, 76, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 233, -1 };
+static int op11[] = { 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96, 233, -1 };
+static int op12[] = { 151, 152, 153, 154, 155, 156, 157, 233, -1 };
+static int op13[] = { 158, 159, 160, 161, 162, 233, -1 };
+static int op14[] = { 163, 164, 165, 166, 167, 168, 233, -1 };
+static int op15[] = { 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 183, 184, 185, 186, 187, 188, 189, 233, -1 };
+static int op16[] = { 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 233, -1 };
+static int op17[] = { 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 233, -1 };
+static int op18[] = { 97, 98, 99, 100, 101, 102, 103, 233, -1 };
+static int op19[] = { 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 233, -1 };
+static int op20[] = { 210, 211, 212, 213, 232, 233, -1 };
+static int op21[] = { -1 };
+static int op22[] = { -1 };
+static int op23[] = { 169, 170, 171, 172, 173, 174, 175, 227, 232, 233, -1 };
+static int op24[] = { 205, 206, 207, 208, 209, 232, 233, -1 };
+static int op25[] = { 176, 177, 178, 179, 180, 181, 182, 233, -1 };
+static int op26[] = { 176, 177, 178, 179, 180, 181, 182, 233, -1 };
+static int op27[] = { 176, 177, 178, 179, 180, 181, 182, 233, -1 };
+static int op28[] = { 176, 177, 178, 179, 180, 181, 182, 233, -1 };
+static int op29[] = { 176, 177, 178, 179, 180, 181, 182, 233, -1 };
+static int op30[] = { 176, 177, 178, 179, 180, 181, 182, 233, -1 };
+static int op31[] = { 176, 177, 178, 179, 180, 181, 182, 233, -1 };
+static int op32[] = { 176, 177, 178, 179, 180, 181, 182, 233, -1 };
+static int op33[] = { 176, 177, 178, 179, 180, 181, 182, 233, -1 };
+static int op34[] = { 176, 177, 178, 179, 180, 181, 182, 233, -1 };
+static int op35[] = { 233, -1 };
+static int op36[] = { 230, 232, 233, -1 };
+static int op37[] = { 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 232, 233, -1 };
+static int op38[] = { 1, 232, 233, -1 };
+static int op39[] = { 233, -1 };
+static int op40[] = { 233, -1 };
+static int op41[] = { 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 233, -1 };
+static int op42[] = { 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 232, 233, -1 };
+static int op43[] = { 233, -1 };
+static int op44[] = { 232, 233, -1 };
+static int op45[] = { 65, 66, 67, 233, -1 };
+static int op46[] = { 62, 63, 64, 232, 233, -1 };
+static int op47[] = { 231, 233, -1 };
+static int op48[] = { 233, -1 };
+static int op49[] = { 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 228, -1 };
+static int op50[] = { 150, 229, -1 };
+static int op51[] = { 226, 232, 233, -1 };
+static int op52[] = { 232, 233, -1 };
+static int op53[] = { 233, -1 };
+static int op54[] = { 190, 232, 233, -1 };
+static int op55[] = { -1 };
+static int op56[] = { 233, -1 };
+static int op57[] = { 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 232, 233, -1 };
+static int op58[] = { 232, 233, -1 };
+
+int *qtable[] = { 
+	op0,
+	op1,
+	op2,
+	op3,
+	op4,
+	op5,
+	op6,
+	op7,
+	op8,
+	op9,
+	op10,
+	op11,
+	op12,
+	op13,
+	op14,
+	op15,
+	op16,
+	op17,
+	op18,
+	op19,
+	op20,
+	op21,
+	op22,
+	op23,
+	op24,
+	op25,
+	op26,
+	op27,
+	op28,
+	op29,
+	op30,
+	op31,
+	op32,
+	op33,
+	op34,
+	op35,
+	op36,
+	op37,
+	op38,
+	op39,
+	op40,
+	op41,
+	op42,
+	op43,
+	op44,
+	op45,
+	op46,
+	op47,
+	op48,
+	op49,
+	op50,
+	op51,
+	op52,
+	op53,
+	op54,
+	op55,
+	op56,
+	op57,
+	op58,
+};
+int tempregs[] = { 0, 1, 2, -1 };
+int permregs[] = { 3, 4, 5, -1 };
+bittype validregs[] = {
+	0xffffff3f,
+	0x0000007f,
+};
+static int amap[MAXREGS][NUMCLASS] = {
+	/* 0 */{ 0x1,0x3,0x1f,0x0 },
+	/* 1 */{ 0x2,0xc,0x1e1,0x0 },
+	/* 2 */{ 0x4,0x30,0xe22,0x0 },
+	/* 3 */{ 0x8,0xc0,0x3244,0x0 },
+	/* 4 */{ 0x10,0x0,0x5488,0x0 },
+	/* 5 */{ 0x20,0x0,0x6910,0x0 },
+	/* 6 */{ 0x0,0x0,0x0,0x0 },
+	/* 7 */{ 0x0,0x0,0x0,0x0 },
+	/* 8 */{ 0x1,0x1,0x1f,0x0 },
+	/* 9 */{ 0x1,0x2,0x1f,0x0 },
+	/* 10 */{ 0x2,0x4,0x1e1,0x0 },
+	/* 11 */{ 0x2,0x8,0x1e1,0x0 },
+	/* 12 */{ 0x4,0x10,0xe22,0x0 },
+	/* 13 */{ 0x4,0x20,0xe22,0x0 },
+	/* 14 */{ 0x8,0x40,0x3244,0x0 },
+	/* 15 */{ 0x8,0x80,0x3244,0x0 },
+	/* 16 */{ 0x3,0xf,0x1ff,0x0 },
+	/* 17 */{ 0x5,0x33,0xe3f,0x0 },
+	/* 18 */{ 0x9,0xc3,0x325f,0x0 },
+	/* 19 */{ 0x11,0x3,0x549f,0x0 },
+	/* 20 */{ 0x21,0x3,0x691f,0x0 },
+	/* 21 */{ 0x6,0x3c,0xfe3,0x0 },
+	/* 22 */{ 0xa,0xcc,0x33e5,0x0 },
+	/* 23 */{ 0x12,0xc,0x55e9,0x0 },
+	/* 24 */{ 0x22,0xc,0x69f1,0x0 },
+	/* 25 */{ 0xc,0xf0,0x3e66,0x0 },
+	/* 26 */{ 0x14,0x30,0x5eaa,0x0 },
+	/* 27 */{ 0x24,0x30,0x6f32,0x0 },
+	/* 28 */{ 0x18,0xc0,0x76cc,0x0 },
+	/* 29 */{ 0x28,0xc0,0x7b54,0x0 },
+	/* 30 */{ 0x30,0x0,0x7d98,0x0 },
+	/* 31 */{ 0x0,0x0,0x0,0x1 },
+	/* 32 */{ 0x0,0x0,0x0,0x2 },
+	/* 33 */{ 0x0,0x0,0x0,0x4 },
+	/* 34 */{ 0x0,0x0,0x0,0x8 },
+	/* 35 */{ 0x0,0x0,0x0,0x10 },
+	/* 36 */{ 0x0,0x0,0x0,0x20 },
+	/* 37 */{ 0x0,0x0,0x0,0x40 },
+	/* 38 */{ 0x0,0x0,0x0,0x80 },
+};
+int
+aliasmap(int class, int regnum)
+{
+	return amap[regnum][class-1];
+}
+static int rmap[NUMCLASS][15] = {
+	{ 0, 1, 2, 3, 4, 5, },
+	{ 8, 9, 10, 11, 12, 13, 14, 15, },
+	{ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, },
+	{ 31, 32, 33, 34, 35, 36, 37, 38, },
+};
+
+int
+color2reg(int color, int class)
+{
+	return rmap[class-1][color];
+}
+int regK[] = { 0, 6, 8, 15, 8, 0, 0, 0 };
+int
+classmask(int class)
+{
+	if(class == CLASSA) return 0x3f;
+	if(class == CLASSB) return 0xff;
+	if(class == CLASSC) return 0x7fff;
+	if(class == CLASSD) return 0xff;
+	if(class == CLASSE) return 0x0;
+	if(class == CLASSF) return 0x0;
+	return 0x0;
+}
+static bittype ovlarr[MAXREGS][2] = {
+{ 0x1f0301, 0x0,  },
+{ 0x1e10c02, 0x0,  },
+{ 0xe223004, 0x0,  },
+{ 0x3244c008, 0x0,  },
+{ 0x54880010, 0x0,  },
+{ 0x69100020, 0x0,  },
+{ 0x40, 0x0,  },
+{ 0x80, 0x0,  },
+{ 0x1f0101, 0x0,  },
+{ 0x1f0201, 0x0,  },
+{ 0x1e10402, 0x0,  },
+{ 0x1e10802, 0x0,  },
+{ 0xe221004, 0x0,  },
+{ 0xe222004, 0x0,  },
+{ 0x32444008, 0x0,  },
+{ 0x32448008, 0x0,  },
+{ 0x1ff0f03, 0x0,  },
+{ 0xe3f3305, 0x0,  },
+{ 0x325fc309, 0x0,  },
+{ 0x549f0311, 0x0,  },
+{ 0x691f0321, 0x0,  },
+{ 0xfe33c06, 0x0,  },
+{ 0x33e5cc0a, 0x0,  },
+{ 0x55e90c12, 0x0,  },
+{ 0x69f10c22, 0x0,  },
+{ 0x3e66f00c, 0x0,  },
+{ 0x5eaa3014, 0x0,  },
+{ 0x6f323024, 0x0,  },
+{ 0x76ccc018, 0x0,  },
+{ 0x7b54c028, 0x0,  },
+{ 0x7d980030, 0x0,  },
+{ 0x80000000, 0x0,  },
+{ 0x0, 0x1,  },
+{ 0x0, 0x2,  },
+{ 0x0, 0x4,  },
+{ 0x0, 0x8,  },
+{ 0x0, 0x10,  },
+{ 0x0, 0x20,  },
+{ 0x0, 0x40,  },
+};
+int
+interferes(int reg1, int reg2)
+{
+return (TESTBIT(ovlarr[reg1], reg2)) != 0;
+}
Index: uspace/app/pcc/cc/ccom/arch/ia32/external.h
===================================================================
--- uspace/app/pcc/cc/ccom/arch/ia32/external.h	(revision e4f8c77d2f0ec68a5943a6b063aaa901dc22d1b4)
+++ uspace/app/pcc/cc/ccom/arch/ia32/external.h	(revision e4f8c77d2f0ec68a5943a6b063aaa901dc22d1b4)
@@ -0,0 +1,25 @@
+#ifndef _EXTERNAL_H_
+#define _EXTERNAL_H_
+#define MAXOPLEN 42
+#define NUMBITS 32
+#define BIT2BYTE(bits) ((((bits)+NUMBITS-1)/NUMBITS)*(NUMBITS/8))
+#define BITSET(arr, bit) (arr[bit/NUMBITS] |= ((int)1 << (bit & (NUMBITS-1))))
+#define BITCLEAR(arr, bit) (arr[bit/NUMBITS] &= ~((int)1 << (bit & (NUMBITS-1))))
+#define TESTBIT(arr, bit) (arr[bit/NUMBITS] & ((int)1 << (bit & (NUMBITS-1))))
+typedef int bittype;
+extern int tempregs[], permregs[];
+#define NTEMPREG 4
+#define FREGS 3
+#define NPERMREG 4
+extern bittype validregs[];
+#define AREGCNT 6
+#define BREGCNT 8
+#define CREGCNT 15
+#define DREGCNT 8
+#define EREGCNT 0
+#define FREGCNT 0
+#define GREGCNT 0
+int aliasmap(int class, int regnum);
+int color2reg(int color, int class);
+int interferes(int reg1, int reg2);
+#endif /* _EXTERNAL_H_ */
Index: uspace/app/pcc/cc/ccom/arch/ia64/external.c
===================================================================
--- uspace/app/pcc/cc/ccom/arch/ia64/external.c	(revision e4f8c77d2f0ec68a5943a6b063aaa901dc22d1b4)
+++ uspace/app/pcc/cc/ccom/arch/ia64/external.c	(revision e4f8c77d2f0ec68a5943a6b063aaa901dc22d1b4)
@@ -0,0 +1,246 @@
+#include "pass2.h"
+
+// TODO: replace with file generated by ccom_mkext
+
+static int op0[] = { -1 };
+static int op1[] = { -1 };
+static int op2[] = { -1 };
+static int op3[] = { -1 };
+static int op4[] = { -1 };
+static int op5[] = { -1 };
+static int op6[] = { -1 };
+static int op7[] = { -1 };
+static int op8[] = { -1 };
+static int op9[] = { -1 };
+static int op10[] = { -1 };
+static int op11[] = { -1 };
+static int op12[] = { -1 };
+static int op13[] = { -1 };
+static int op14[] = { -1 };
+static int op15[] = { -1 };
+static int op16[] = { -1 };
+static int op17[] = { -1 };
+static int op18[] = { -1 };
+static int op19[] = { -1 };
+static int op20[] = { -1 };
+static int op21[] = { -1 };
+static int op22[] = { -1 };
+static int op23[] = { -1 };
+static int op24[] = { -1 };
+static int op25[] = { -1 };
+static int op26[] = { -1 };
+static int op27[] = { -1 };
+static int op28[] = { -1 };
+static int op29[] = { -1 };
+static int op30[] = { -1 };
+static int op31[] = { -1 };
+static int op32[] = { -1 };
+static int op33[] = { -1 };
+static int op34[] = { -1 };
+static int op35[] = { -1 };
+static int op36[] = { -1 };
+static int op37[] = { -1 };
+static int op38[] = { -1 };
+static int op39[] = { -1 };
+static int op40[] = { -1 };
+static int op41[] = { -1 };
+static int op42[] = { -1 };
+static int op43[] = { -1 };
+static int op44[] = { -1 };
+static int op45[] = { -1 };
+static int op46[] = { -1 };
+static int op47[] = { -1 };
+static int op48[] = { -1 };
+static int op49[] = { -1 };
+static int op50[] = { -1 };
+static int op51[] = { -1 };
+static int op52[] = { -1 };
+static int op53[] = { -1 };
+static int op54[] = { -1 };
+static int op55[] = { -1 };
+static int op56[] = { -1 };
+static int op57[] = { -1 };
+static int op58[] = { -1 };
+
+int *qtable[] = { 
+	op0,
+	op1,
+	op2,
+	op3,
+	op4,
+	op5,
+	op6,
+	op7,
+	op8,
+	op9,
+	op10,
+	op11,
+	op12,
+	op13,
+	op14,
+	op15,
+	op16,
+	op17,
+	op18,
+	op19,
+	op20,
+	op21,
+	op22,
+	op23,
+	op24,
+	op25,
+	op26,
+	op27,
+	op28,
+	op29,
+	op30,
+	op31,
+	op32,
+	op33,
+	op34,
+	op35,
+	op36,
+	op37,
+	op38,
+	op39,
+	op40,
+	op41,
+	op42,
+	op43,
+	op44,
+	op45,
+	op46,
+	op47,
+	op48,
+	op49,
+	op50,
+	op51,
+	op52,
+	op53,
+	op54,
+	op55,
+	op56,
+	op57,
+	op58,
+};
+int tempregs[] = { -1 };
+int permregs[] = { -1 };
+bittype validregs[] = {
+	0x7fffffffff,
+};
+static int amap[MAXREGS][NUMCLASS] = {
+	/* 0 */{ 0x0,0x0,0x0,0x0 },
+	/* 1 */{ 0x0,0x0,0x0,0x0 },
+	/* 2 */{ 0x0,0x0,0x0,0x0 },
+	/* 3 */{ 0x0,0x0,0x0,0x0 },
+	/* 4 */{ 0x0,0x0,0x0,0x0 },
+	/* 5 */{ 0x0,0x0,0x0,0x0 },
+	/* 6 */{ 0x0,0x0,0x0,0x0 },
+	/* 7 */{ 0x0,0x0,0x0,0x0 },
+	/* 8 */{ 0x0,0x0,0x0,0x0 },
+	/* 9 */{ 0x0,0x0,0x0,0x0 },
+	/* 10 */{ 0x0,0x0,0x0,0x0 },
+	/* 11 */{ 0x0,0x0,0x0,0x0 },
+	/* 12 */{ 0x0,0x0,0x0,0x0 },
+	/* 13 */{ 0x0,0x0,0x0,0x0 },
+	/* 14 */{ 0x0,0x0,0x0,0x0 },
+	/* 15 */{ 0x0,0x0,0x0,0x0 },
+	/* 16 */{ 0x0,0x0,0x0,0x0 },
+	/* 17 */{ 0x0,0x0,0x0,0x0 },
+	/* 18 */{ 0x0,0x0,0x0,0x0 },
+	/* 19 */{ 0x0,0x0,0x0,0x0 },
+	/* 20 */{ 0x0,0x0,0x0,0x0 },
+	/* 21 */{ 0x0,0x0,0x0,0x0 },
+	/* 22 */{ 0x0,0x0,0x0,0x0 },
+	/* 23 */{ 0x0,0x0,0x0,0x0 },
+	/* 24 */{ 0x0,0x0,0x0,0x0 },
+	/* 25 */{ 0x0,0x0,0x0,0x0 },
+	/* 26 */{ 0x0,0x0,0x0,0x0 },
+	/* 27 */{ 0x0,0x0,0x0,0x0 },
+	/* 28 */{ 0x0,0x0,0x0,0x0 },
+	/* 29 */{ 0x0,0x0,0x0,0x0 },
+	/* 30 */{ 0x0,0x0,0x0,0x0 },
+	/* 31 */{ 0x0,0x0,0x0,0x0 },
+	/* 32 */{ 0x0,0x0,0x0,0x0 },
+	/* 33 */{ 0x0,0x0,0x0,0x0 },
+	/* 34 */{ 0x0,0x0,0x0,0x0 },
+	/* 35 */{ 0x0,0x0,0x0,0x0 },
+	/* 36 */{ 0x0,0x0,0x0,0x0 },
+	/* 37 */{ 0x0,0x0,0x0,0x0 },
+	/* 38 */{ 0x0,0x0,0x0,0x0 }
+};
+int
+aliasmap(int class, int regnum)
+{
+	return amap[regnum][class-1];
+}
+static int rmap[NUMCLASS][15] = {
+	{ 0, 1, 2, 3, 4, 5, },
+	{ 8, 9, 10, 11, 12, 13, 14, 15, },
+	{ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, },
+	{ 31, 32, 33, 34, 35, 36, 37, 38, },
+};
+
+int
+color2reg(int color, int class)
+{
+	return rmap[class-1][color];
+}
+int regK[] = { 0, 0, 0, 0, 0, 0, 0, 0 };
+int
+classmask(int class)
+{
+	if(class == CLASSA) return 0x0;
+	if(class == CLASSB) return 0x0;
+	if(class == CLASSC) return 0x0;
+	if(class == CLASSD) return 0x0;
+	if(class == CLASSE) return 0x0;
+	if(class == CLASSF) return 0x0;
+	return 0x0;
+}
+static bittype ovlarr[MAXREGS][1] = {
+{ 0x1f0301,  },
+{ 0x1e10c02,  },
+{ 0xe223004,  },
+{ 0x3244c008,  },
+{ 0x54880010,  },
+{ 0x69100020,  },
+{ 0x40,  },
+{ 0x80,  },
+{ 0x1f0101,  },
+{ 0x1f0201,  },
+{ 0x1e10402,  },
+{ 0x1e10802,  },
+{ 0xe221004,  },
+{ 0xe222004,  },
+{ 0x32444008,  },
+{ 0x32448008,  },
+{ 0x1ff0f03,  },
+{ 0xe3f3305,  },
+{ 0x325fc309,  },
+{ 0x549f0311,  },
+{ 0x691f0321,  },
+{ 0xfe33c06,  },
+{ 0x33e5cc0a,  },
+{ 0x55e90c12,  },
+{ 0x69f10c22,  },
+{ 0x3e66f00c,  },
+{ 0x5eaa3014,  },
+{ 0x6f323024,  },
+{ 0x76ccc018,  },
+{ 0x7b54c028,  },
+{ 0x7d980030,  },
+{ 0x80000000,  },
+{ 0x1,  },
+{ 0x2,  },
+{ 0x4,  },
+{ 0x8,  },
+{ 0x10,  },
+{ 0x20,  },
+{ 0x40,  },
+};
+int
+interferes(int reg1, int reg2)
+{
+return (TESTBIT(ovlarr[reg1], reg2)) != 0;
+}
Index: uspace/app/pcc/cc/ccom/arch/ia64/external.h
===================================================================
--- uspace/app/pcc/cc/ccom/arch/ia64/external.h	(revision e4f8c77d2f0ec68a5943a6b063aaa901dc22d1b4)
+++ uspace/app/pcc/cc/ccom/arch/ia64/external.h	(revision e4f8c77d2f0ec68a5943a6b063aaa901dc22d1b4)
@@ -0,0 +1,27 @@
+// TODO: replace with file generated by ccom_mkext
+
+#ifndef _EXTERNAL_H_
+#define _EXTERNAL_H_
+#define MAXOPLEN 0
+#define NUMBITS 32
+#define BIT2BYTE(bits) ((((bits)+NUMBITS-1)/NUMBITS)*(NUMBITS/8))
+#define BITSET(arr, bit) (arr[bit/NUMBITS] |= ((int)1 << (bit & (NUMBITS-1))))
+#define BITCLEAR(arr, bit) (arr[bit/NUMBITS] &= ~((int)1 << (bit & (NUMBITS-1))))
+#define TESTBIT(arr, bit) (arr[bit/NUMBITS] & ((int)1 << (bit & (NUMBITS-1))))
+typedef int bittype;
+extern int tempregs[], permregs[];
+#define NTEMPREG 0
+#define FREGS 0
+#define NPERMREG 0
+extern bittype validregs[];
+#define AREGCNT 0
+#define BREGCNT 0
+#define CREGCNT 0
+#define DREGCNT 0
+#define EREGCNT 0
+#define FREGCNT 0
+#define GREGCNT 0
+int aliasmap(int class, int regnum);
+int color2reg(int color, int class);
+int interferes(int reg1, int reg2);
+#endif /* _EXTERNAL_H_ */
Index: uspace/app/pcc/cc/ccom/arch/mips32/external.c
===================================================================
--- uspace/app/pcc/cc/ccom/arch/mips32/external.c	(revision e4f8c77d2f0ec68a5943a6b063aaa901dc22d1b4)
+++ uspace/app/pcc/cc/ccom/arch/mips32/external.c	(revision e4f8c77d2f0ec68a5943a6b063aaa901dc22d1b4)
@@ -0,0 +1,246 @@
+#include "pass2.h"
+
+// TODO: replace with file generated by ccom_mkext
+
+static int op0[] = { -1 };
+static int op1[] = { -1 };
+static int op2[] = { -1 };
+static int op3[] = { -1 };
+static int op4[] = { -1 };
+static int op5[] = { -1 };
+static int op6[] = { -1 };
+static int op7[] = { -1 };
+static int op8[] = { -1 };
+static int op9[] = { -1 };
+static int op10[] = { -1 };
+static int op11[] = { -1 };
+static int op12[] = { -1 };
+static int op13[] = { -1 };
+static int op14[] = { -1 };
+static int op15[] = { -1 };
+static int op16[] = { -1 };
+static int op17[] = { -1 };
+static int op18[] = { -1 };
+static int op19[] = { -1 };
+static int op20[] = { -1 };
+static int op21[] = { -1 };
+static int op22[] = { -1 };
+static int op23[] = { -1 };
+static int op24[] = { -1 };
+static int op25[] = { -1 };
+static int op26[] = { -1 };
+static int op27[] = { -1 };
+static int op28[] = { -1 };
+static int op29[] = { -1 };
+static int op30[] = { -1 };
+static int op31[] = { -1 };
+static int op32[] = { -1 };
+static int op33[] = { -1 };
+static int op34[] = { -1 };
+static int op35[] = { -1 };
+static int op36[] = { -1 };
+static int op37[] = { -1 };
+static int op38[] = { -1 };
+static int op39[] = { -1 };
+static int op40[] = { -1 };
+static int op41[] = { -1 };
+static int op42[] = { -1 };
+static int op43[] = { -1 };
+static int op44[] = { -1 };
+static int op45[] = { -1 };
+static int op46[] = { -1 };
+static int op47[] = { -1 };
+static int op48[] = { -1 };
+static int op49[] = { -1 };
+static int op50[] = { -1 };
+static int op51[] = { -1 };
+static int op52[] = { -1 };
+static int op53[] = { -1 };
+static int op54[] = { -1 };
+static int op55[] = { -1 };
+static int op56[] = { -1 };
+static int op57[] = { -1 };
+static int op58[] = { -1 };
+
+int *qtable[] = { 
+	op0,
+	op1,
+	op2,
+	op3,
+	op4,
+	op5,
+	op6,
+	op7,
+	op8,
+	op9,
+	op10,
+	op11,
+	op12,
+	op13,
+	op14,
+	op15,
+	op16,
+	op17,
+	op18,
+	op19,
+	op20,
+	op21,
+	op22,
+	op23,
+	op24,
+	op25,
+	op26,
+	op27,
+	op28,
+	op29,
+	op30,
+	op31,
+	op32,
+	op33,
+	op34,
+	op35,
+	op36,
+	op37,
+	op38,
+	op39,
+	op40,
+	op41,
+	op42,
+	op43,
+	op44,
+	op45,
+	op46,
+	op47,
+	op48,
+	op49,
+	op50,
+	op51,
+	op52,
+	op53,
+	op54,
+	op55,
+	op56,
+	op57,
+	op58,
+};
+int tempregs[] = { -1 };
+int permregs[] = { -1 };
+bittype validregs[] = {
+	0x7fffffffff,
+};
+static int amap[MAXREGS][NUMCLASS] = {
+	/* 0 */{ 0x0,0x0,0x0,0x0 },
+	/* 1 */{ 0x0,0x0,0x0,0x0 },
+	/* 2 */{ 0x0,0x0,0x0,0x0 },
+	/* 3 */{ 0x0,0x0,0x0,0x0 },
+	/* 4 */{ 0x0,0x0,0x0,0x0 },
+	/* 5 */{ 0x0,0x0,0x0,0x0 },
+	/* 6 */{ 0x0,0x0,0x0,0x0 },
+	/* 7 */{ 0x0,0x0,0x0,0x0 },
+	/* 8 */{ 0x0,0x0,0x0,0x0 },
+	/* 9 */{ 0x0,0x0,0x0,0x0 },
+	/* 10 */{ 0x0,0x0,0x0,0x0 },
+	/* 11 */{ 0x0,0x0,0x0,0x0 },
+	/* 12 */{ 0x0,0x0,0x0,0x0 },
+	/* 13 */{ 0x0,0x0,0x0,0x0 },
+	/* 14 */{ 0x0,0x0,0x0,0x0 },
+	/* 15 */{ 0x0,0x0,0x0,0x0 },
+	/* 16 */{ 0x0,0x0,0x0,0x0 },
+	/* 17 */{ 0x0,0x0,0x0,0x0 },
+	/* 18 */{ 0x0,0x0,0x0,0x0 },
+	/* 19 */{ 0x0,0x0,0x0,0x0 },
+	/* 20 */{ 0x0,0x0,0x0,0x0 },
+	/* 21 */{ 0x0,0x0,0x0,0x0 },
+	/* 22 */{ 0x0,0x0,0x0,0x0 },
+	/* 23 */{ 0x0,0x0,0x0,0x0 },
+	/* 24 */{ 0x0,0x0,0x0,0x0 },
+	/* 25 */{ 0x0,0x0,0x0,0x0 },
+	/* 26 */{ 0x0,0x0,0x0,0x0 },
+	/* 27 */{ 0x0,0x0,0x0,0x0 },
+	/* 28 */{ 0x0,0x0,0x0,0x0 },
+	/* 29 */{ 0x0,0x0,0x0,0x0 },
+	/* 30 */{ 0x0,0x0,0x0,0x0 },
+	/* 31 */{ 0x0,0x0,0x0,0x0 },
+	/* 32 */{ 0x0,0x0,0x0,0x0 },
+	/* 33 */{ 0x0,0x0,0x0,0x0 },
+	/* 34 */{ 0x0,0x0,0x0,0x0 },
+	/* 35 */{ 0x0,0x0,0x0,0x0 },
+	/* 36 */{ 0x0,0x0,0x0,0x0 },
+	/* 37 */{ 0x0,0x0,0x0,0x0 },
+	/* 38 */{ 0x0,0x0,0x0,0x0 }
+};
+int
+aliasmap(int class, int regnum)
+{
+	return amap[regnum][class-1];
+}
+static int rmap[NUMCLASS][15] = {
+	{ 0, 1, 2, 3, 4, 5, },
+	{ 8, 9, 10, 11, 12, 13, 14, 15, },
+	{ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, },
+	{ 31, 32, 33, 34, 35, 36, 37, 38, },
+};
+
+int
+color2reg(int color, int class)
+{
+	return rmap[class-1][color];
+}
+int regK[] = { 0, 0, 0, 0, 0, 0, 0, 0 };
+int
+classmask(int class)
+{
+	if(class == CLASSA) return 0x0;
+	if(class == CLASSB) return 0x0;
+	if(class == CLASSC) return 0x0;
+	if(class == CLASSD) return 0x0;
+	if(class == CLASSE) return 0x0;
+	if(class == CLASSF) return 0x0;
+	return 0x0;
+}
+static bittype ovlarr[MAXREGS][1] = {
+{ 0x1f0301,  },
+{ 0x1e10c02,  },
+{ 0xe223004,  },
+{ 0x3244c008,  },
+{ 0x54880010,  },
+{ 0x69100020,  },
+{ 0x40,  },
+{ 0x80,  },
+{ 0x1f0101,  },
+{ 0x1f0201,  },
+{ 0x1e10402,  },
+{ 0x1e10802,  },
+{ 0xe221004,  },
+{ 0xe222004,  },
+{ 0x32444008,  },
+{ 0x32448008,  },
+{ 0x1ff0f03,  },
+{ 0xe3f3305,  },
+{ 0x325fc309,  },
+{ 0x549f0311,  },
+{ 0x691f0321,  },
+{ 0xfe33c06,  },
+{ 0x33e5cc0a,  },
+{ 0x55e90c12,  },
+{ 0x69f10c22,  },
+{ 0x3e66f00c,  },
+{ 0x5eaa3014,  },
+{ 0x6f323024,  },
+{ 0x76ccc018,  },
+{ 0x7b54c028,  },
+{ 0x7d980030,  },
+{ 0x80000000,  },
+{ 0x1,  },
+{ 0x2,  },
+{ 0x4,  },
+{ 0x8,  },
+{ 0x10,  },
+{ 0x20,  },
+{ 0x40,  },
+};
+int
+interferes(int reg1, int reg2)
+{
+return (TESTBIT(ovlarr[reg1], reg2)) != 0;
+}
Index: uspace/app/pcc/cc/ccom/arch/mips32/external.h
===================================================================
--- uspace/app/pcc/cc/ccom/arch/mips32/external.h	(revision e4f8c77d2f0ec68a5943a6b063aaa901dc22d1b4)
+++ uspace/app/pcc/cc/ccom/arch/mips32/external.h	(revision e4f8c77d2f0ec68a5943a6b063aaa901dc22d1b4)
@@ -0,0 +1,27 @@
+// TODO: replace with file generated by ccom_mkext
+
+#ifndef _EXTERNAL_H_
+#define _EXTERNAL_H_
+#define MAXOPLEN 0
+#define NUMBITS 32
+#define BIT2BYTE(bits) ((((bits)+NUMBITS-1)/NUMBITS)*(NUMBITS/8))
+#define BITSET(arr, bit) (arr[bit/NUMBITS] |= ((int)1 << (bit & (NUMBITS-1))))
+#define BITCLEAR(arr, bit) (arr[bit/NUMBITS] &= ~((int)1 << (bit & (NUMBITS-1))))
+#define TESTBIT(arr, bit) (arr[bit/NUMBITS] & ((int)1 << (bit & (NUMBITS-1))))
+typedef int bittype;
+extern int tempregs[], permregs[];
+#define NTEMPREG 0
+#define FREGS 0
+#define NPERMREG 0
+extern bittype validregs[];
+#define AREGCNT 0
+#define BREGCNT 0
+#define CREGCNT 0
+#define DREGCNT 0
+#define EREGCNT 0
+#define FREGCNT 0
+#define GREGCNT 0
+int aliasmap(int class, int regnum);
+int color2reg(int color, int class);
+int interferes(int reg1, int reg2);
+#endif /* _EXTERNAL_H_ */
Index: uspace/app/pcc/cc/ccom/arch/ppc32/external.c
===================================================================
--- uspace/app/pcc/cc/ccom/arch/ppc32/external.c	(revision e4f8c77d2f0ec68a5943a6b063aaa901dc22d1b4)
+++ uspace/app/pcc/cc/ccom/arch/ppc32/external.c	(revision e4f8c77d2f0ec68a5943a6b063aaa901dc22d1b4)
@@ -0,0 +1,246 @@
+#include "pass2.h"
+
+// TODO: replace with file generated by ccom_mkext
+
+static int op0[] = { -1 };
+static int op1[] = { -1 };
+static int op2[] = { -1 };
+static int op3[] = { -1 };
+static int op4[] = { -1 };
+static int op5[] = { -1 };
+static int op6[] = { -1 };
+static int op7[] = { -1 };
+static int op8[] = { -1 };
+static int op9[] = { -1 };
+static int op10[] = { -1 };
+static int op11[] = { -1 };
+static int op12[] = { -1 };
+static int op13[] = { -1 };
+static int op14[] = { -1 };
+static int op15[] = { -1 };
+static int op16[] = { -1 };
+static int op17[] = { -1 };
+static int op18[] = { -1 };
+static int op19[] = { -1 };
+static int op20[] = { -1 };
+static int op21[] = { -1 };
+static int op22[] = { -1 };
+static int op23[] = { -1 };
+static int op24[] = { -1 };
+static int op25[] = { -1 };
+static int op26[] = { -1 };
+static int op27[] = { -1 };
+static int op28[] = { -1 };
+static int op29[] = { -1 };
+static int op30[] = { -1 };
+static int op31[] = { -1 };
+static int op32[] = { -1 };
+static int op33[] = { -1 };
+static int op34[] = { -1 };
+static int op35[] = { -1 };
+static int op36[] = { -1 };
+static int op37[] = { -1 };
+static int op38[] = { -1 };
+static int op39[] = { -1 };
+static int op40[] = { -1 };
+static int op41[] = { -1 };
+static int op42[] = { -1 };
+static int op43[] = { -1 };
+static int op44[] = { -1 };
+static int op45[] = { -1 };
+static int op46[] = { -1 };
+static int op47[] = { -1 };
+static int op48[] = { -1 };
+static int op49[] = { -1 };
+static int op50[] = { -1 };
+static int op51[] = { -1 };
+static int op52[] = { -1 };
+static int op53[] = { -1 };
+static int op54[] = { -1 };
+static int op55[] = { -1 };
+static int op56[] = { -1 };
+static int op57[] = { -1 };
+static int op58[] = { -1 };
+
+int *qtable[] = { 
+	op0,
+	op1,
+	op2,
+	op3,
+	op4,
+	op5,
+	op6,
+	op7,
+	op8,
+	op9,
+	op10,
+	op11,
+	op12,
+	op13,
+	op14,
+	op15,
+	op16,
+	op17,
+	op18,
+	op19,
+	op20,
+	op21,
+	op22,
+	op23,
+	op24,
+	op25,
+	op26,
+	op27,
+	op28,
+	op29,
+	op30,
+	op31,
+	op32,
+	op33,
+	op34,
+	op35,
+	op36,
+	op37,
+	op38,
+	op39,
+	op40,
+	op41,
+	op42,
+	op43,
+	op44,
+	op45,
+	op46,
+	op47,
+	op48,
+	op49,
+	op50,
+	op51,
+	op52,
+	op53,
+	op54,
+	op55,
+	op56,
+	op57,
+	op58,
+};
+int tempregs[] = { -1 };
+int permregs[] = { -1 };
+bittype validregs[] = {
+	0x7fffffffff,
+};
+static int amap[MAXREGS][NUMCLASS] = {
+	/* 0 */{ 0x0,0x0,0x0,0x0 },
+	/* 1 */{ 0x0,0x0,0x0,0x0 },
+	/* 2 */{ 0x0,0x0,0x0,0x0 },
+	/* 3 */{ 0x0,0x0,0x0,0x0 },
+	/* 4 */{ 0x0,0x0,0x0,0x0 },
+	/* 5 */{ 0x0,0x0,0x0,0x0 },
+	/* 6 */{ 0x0,0x0,0x0,0x0 },
+	/* 7 */{ 0x0,0x0,0x0,0x0 },
+	/* 8 */{ 0x0,0x0,0x0,0x0 },
+	/* 9 */{ 0x0,0x0,0x0,0x0 },
+	/* 10 */{ 0x0,0x0,0x0,0x0 },
+	/* 11 */{ 0x0,0x0,0x0,0x0 },
+	/* 12 */{ 0x0,0x0,0x0,0x0 },
+	/* 13 */{ 0x0,0x0,0x0,0x0 },
+	/* 14 */{ 0x0,0x0,0x0,0x0 },
+	/* 15 */{ 0x0,0x0,0x0,0x0 },
+	/* 16 */{ 0x0,0x0,0x0,0x0 },
+	/* 17 */{ 0x0,0x0,0x0,0x0 },
+	/* 18 */{ 0x0,0x0,0x0,0x0 },
+	/* 19 */{ 0x0,0x0,0x0,0x0 },
+	/* 20 */{ 0x0,0x0,0x0,0x0 },
+	/* 21 */{ 0x0,0x0,0x0,0x0 },
+	/* 22 */{ 0x0,0x0,0x0,0x0 },
+	/* 23 */{ 0x0,0x0,0x0,0x0 },
+	/* 24 */{ 0x0,0x0,0x0,0x0 },
+	/* 25 */{ 0x0,0x0,0x0,0x0 },
+	/* 26 */{ 0x0,0x0,0x0,0x0 },
+	/* 27 */{ 0x0,0x0,0x0,0x0 },
+	/* 28 */{ 0x0,0x0,0x0,0x0 },
+	/* 29 */{ 0x0,0x0,0x0,0x0 },
+	/* 30 */{ 0x0,0x0,0x0,0x0 },
+	/* 31 */{ 0x0,0x0,0x0,0x0 },
+	/* 32 */{ 0x0,0x0,0x0,0x0 },
+	/* 33 */{ 0x0,0x0,0x0,0x0 },
+	/* 34 */{ 0x0,0x0,0x0,0x0 },
+	/* 35 */{ 0x0,0x0,0x0,0x0 },
+	/* 36 */{ 0x0,0x0,0x0,0x0 },
+	/* 37 */{ 0x0,0x0,0x0,0x0 },
+	/* 38 */{ 0x0,0x0,0x0,0x0 }
+};
+int
+aliasmap(int class, int regnum)
+{
+	return amap[regnum][class-1];
+}
+static int rmap[NUMCLASS][15] = {
+	{ 0, 1, 2, 3, 4, 5, },
+	{ 8, 9, 10, 11, 12, 13, 14, 15, },
+	{ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, },
+	{ 31, 32, 33, 34, 35, 36, 37, 38, },
+};
+
+int
+color2reg(int color, int class)
+{
+	return rmap[class-1][color];
+}
+int regK[] = { 0, 0, 0, 0, 0, 0, 0, 0 };
+int
+classmask(int class)
+{
+	if(class == CLASSA) return 0x0;
+	if(class == CLASSB) return 0x0;
+	if(class == CLASSC) return 0x0;
+	if(class == CLASSD) return 0x0;
+	if(class == CLASSE) return 0x0;
+	if(class == CLASSF) return 0x0;
+	return 0x0;
+}
+static bittype ovlarr[MAXREGS][1] = {
+{ 0x1f0301,  },
+{ 0x1e10c02,  },
+{ 0xe223004,  },
+{ 0x3244c008,  },
+{ 0x54880010,  },
+{ 0x69100020,  },
+{ 0x40,  },
+{ 0x80,  },
+{ 0x1f0101,  },
+{ 0x1f0201,  },
+{ 0x1e10402,  },
+{ 0x1e10802,  },
+{ 0xe221004,  },
+{ 0xe222004,  },
+{ 0x32444008,  },
+{ 0x32448008,  },
+{ 0x1ff0f03,  },
+{ 0xe3f3305,  },
+{ 0x325fc309,  },
+{ 0x549f0311,  },
+{ 0x691f0321,  },
+{ 0xfe33c06,  },
+{ 0x33e5cc0a,  },
+{ 0x55e90c12,  },
+{ 0x69f10c22,  },
+{ 0x3e66f00c,  },
+{ 0x5eaa3014,  },
+{ 0x6f323024,  },
+{ 0x76ccc018,  },
+{ 0x7b54c028,  },
+{ 0x7d980030,  },
+{ 0x80000000,  },
+{ 0x1,  },
+{ 0x2,  },
+{ 0x4,  },
+{ 0x8,  },
+{ 0x10,  },
+{ 0x20,  },
+{ 0x40,  },
+};
+int
+interferes(int reg1, int reg2)
+{
+return (TESTBIT(ovlarr[reg1], reg2)) != 0;
+}
Index: uspace/app/pcc/cc/ccom/arch/ppc32/external.h
===================================================================
--- uspace/app/pcc/cc/ccom/arch/ppc32/external.h	(revision e4f8c77d2f0ec68a5943a6b063aaa901dc22d1b4)
+++ uspace/app/pcc/cc/ccom/arch/ppc32/external.h	(revision e4f8c77d2f0ec68a5943a6b063aaa901dc22d1b4)
@@ -0,0 +1,27 @@
+// TODO: replace with file generated by ccom_mkext
+
+#ifndef _EXTERNAL_H_
+#define _EXTERNAL_H_
+#define MAXOPLEN 0
+#define NUMBITS 32
+#define BIT2BYTE(bits) ((((bits)+NUMBITS-1)/NUMBITS)*(NUMBITS/8))
+#define BITSET(arr, bit) (arr[bit/NUMBITS] |= ((int)1 << (bit & (NUMBITS-1))))
+#define BITCLEAR(arr, bit) (arr[bit/NUMBITS] &= ~((int)1 << (bit & (NUMBITS-1))))
+#define TESTBIT(arr, bit) (arr[bit/NUMBITS] & ((int)1 << (bit & (NUMBITS-1))))
+typedef int bittype;
+extern int tempregs[], permregs[];
+#define NTEMPREG 0
+#define FREGS 0
+#define NPERMREG 0
+extern bittype validregs[];
+#define AREGCNT 0
+#define BREGCNT 0
+#define CREGCNT 0
+#define DREGCNT 0
+#define EREGCNT 0
+#define FREGCNT 0
+#define GREGCNT 0
+int aliasmap(int class, int regnum);
+int color2reg(int color, int class);
+int interferes(int reg1, int reg2);
+#endif /* _EXTERNAL_H_ */
Index: uspace/app/pcc/cc/ccom/arch/sparc64/external.c
===================================================================
--- uspace/app/pcc/cc/ccom/arch/sparc64/external.c	(revision e4f8c77d2f0ec68a5943a6b063aaa901dc22d1b4)
+++ uspace/app/pcc/cc/ccom/arch/sparc64/external.c	(revision e4f8c77d2f0ec68a5943a6b063aaa901dc22d1b4)
@@ -0,0 +1,246 @@
+#include "pass2.h"
+
+// TODO: replace with file generated by ccom_mkext
+
+static int op0[] = { -1 };
+static int op1[] = { -1 };
+static int op2[] = { -1 };
+static int op3[] = { -1 };
+static int op4[] = { -1 };
+static int op5[] = { -1 };
+static int op6[] = { -1 };
+static int op7[] = { -1 };
+static int op8[] = { -1 };
+static int op9[] = { -1 };
+static int op10[] = { -1 };
+static int op11[] = { -1 };
+static int op12[] = { -1 };
+static int op13[] = { -1 };
+static int op14[] = { -1 };
+static int op15[] = { -1 };
+static int op16[] = { -1 };
+static int op17[] = { -1 };
+static int op18[] = { -1 };
+static int op19[] = { -1 };
+static int op20[] = { -1 };
+static int op21[] = { -1 };
+static int op22[] = { -1 };
+static int op23[] = { -1 };
+static int op24[] = { -1 };
+static int op25[] = { -1 };
+static int op26[] = { -1 };
+static int op27[] = { -1 };
+static int op28[] = { -1 };
+static int op29[] = { -1 };
+static int op30[] = { -1 };
+static int op31[] = { -1 };
+static int op32[] = { -1 };
+static int op33[] = { -1 };
+static int op34[] = { -1 };
+static int op35[] = { -1 };
+static int op36[] = { -1 };
+static int op37[] = { -1 };
+static int op38[] = { -1 };
+static int op39[] = { -1 };
+static int op40[] = { -1 };
+static int op41[] = { -1 };
+static int op42[] = { -1 };
+static int op43[] = { -1 };
+static int op44[] = { -1 };
+static int op45[] = { -1 };
+static int op46[] = { -1 };
+static int op47[] = { -1 };
+static int op48[] = { -1 };
+static int op49[] = { -1 };
+static int op50[] = { -1 };
+static int op51[] = { -1 };
+static int op52[] = { -1 };
+static int op53[] = { -1 };
+static int op54[] = { -1 };
+static int op55[] = { -1 };
+static int op56[] = { -1 };
+static int op57[] = { -1 };
+static int op58[] = { -1 };
+
+int *qtable[] = { 
+	op0,
+	op1,
+	op2,
+	op3,
+	op4,
+	op5,
+	op6,
+	op7,
+	op8,
+	op9,
+	op10,
+	op11,
+	op12,
+	op13,
+	op14,
+	op15,
+	op16,
+	op17,
+	op18,
+	op19,
+	op20,
+	op21,
+	op22,
+	op23,
+	op24,
+	op25,
+	op26,
+	op27,
+	op28,
+	op29,
+	op30,
+	op31,
+	op32,
+	op33,
+	op34,
+	op35,
+	op36,
+	op37,
+	op38,
+	op39,
+	op40,
+	op41,
+	op42,
+	op43,
+	op44,
+	op45,
+	op46,
+	op47,
+	op48,
+	op49,
+	op50,
+	op51,
+	op52,
+	op53,
+	op54,
+	op55,
+	op56,
+	op57,
+	op58,
+};
+int tempregs[] = { -1 };
+int permregs[] = { -1 };
+bittype validregs[] = {
+	0x7fffffffff,
+};
+static int amap[MAXREGS][NUMCLASS] = {
+	/* 0 */{ 0x0,0x0,0x0,0x0 },
+	/* 1 */{ 0x0,0x0,0x0,0x0 },
+	/* 2 */{ 0x0,0x0,0x0,0x0 },
+	/* 3 */{ 0x0,0x0,0x0,0x0 },
+	/* 4 */{ 0x0,0x0,0x0,0x0 },
+	/* 5 */{ 0x0,0x0,0x0,0x0 },
+	/* 6 */{ 0x0,0x0,0x0,0x0 },
+	/* 7 */{ 0x0,0x0,0x0,0x0 },
+	/* 8 */{ 0x0,0x0,0x0,0x0 },
+	/* 9 */{ 0x0,0x0,0x0,0x0 },
+	/* 10 */{ 0x0,0x0,0x0,0x0 },
+	/* 11 */{ 0x0,0x0,0x0,0x0 },
+	/* 12 */{ 0x0,0x0,0x0,0x0 },
+	/* 13 */{ 0x0,0x0,0x0,0x0 },
+	/* 14 */{ 0x0,0x0,0x0,0x0 },
+	/* 15 */{ 0x0,0x0,0x0,0x0 },
+	/* 16 */{ 0x0,0x0,0x0,0x0 },
+	/* 17 */{ 0x0,0x0,0x0,0x0 },
+	/* 18 */{ 0x0,0x0,0x0,0x0 },
+	/* 19 */{ 0x0,0x0,0x0,0x0 },
+	/* 20 */{ 0x0,0x0,0x0,0x0 },
+	/* 21 */{ 0x0,0x0,0x0,0x0 },
+	/* 22 */{ 0x0,0x0,0x0,0x0 },
+	/* 23 */{ 0x0,0x0,0x0,0x0 },
+	/* 24 */{ 0x0,0x0,0x0,0x0 },
+	/* 25 */{ 0x0,0x0,0x0,0x0 },
+	/* 26 */{ 0x0,0x0,0x0,0x0 },
+	/* 27 */{ 0x0,0x0,0x0,0x0 },
+	/* 28 */{ 0x0,0x0,0x0,0x0 },
+	/* 29 */{ 0x0,0x0,0x0,0x0 },
+	/* 30 */{ 0x0,0x0,0x0,0x0 },
+	/* 31 */{ 0x0,0x0,0x0,0x0 },
+	/* 32 */{ 0x0,0x0,0x0,0x0 },
+	/* 33 */{ 0x0,0x0,0x0,0x0 },
+	/* 34 */{ 0x0,0x0,0x0,0x0 },
+	/* 35 */{ 0x0,0x0,0x0,0x0 },
+	/* 36 */{ 0x0,0x0,0x0,0x0 },
+	/* 37 */{ 0x0,0x0,0x0,0x0 },
+	/* 38 */{ 0x0,0x0,0x0,0x0 }
+};
+int
+aliasmap(int class, int regnum)
+{
+	return amap[regnum][class-1];
+}
+static int rmap[NUMCLASS][15] = {
+	{ 0, 1, 2, 3, 4, 5, },
+	{ 8, 9, 10, 11, 12, 13, 14, 15, },
+	{ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, },
+	{ 31, 32, 33, 34, 35, 36, 37, 38, },
+};
+
+int
+color2reg(int color, int class)
+{
+	return rmap[class-1][color];
+}
+int regK[] = { 0, 0, 0, 0, 0, 0, 0, 0 };
+int
+classmask(int class)
+{
+	if(class == CLASSA) return 0x0;
+	if(class == CLASSB) return 0x0;
+	if(class == CLASSC) return 0x0;
+	if(class == CLASSD) return 0x0;
+	if(class == CLASSE) return 0x0;
+	if(class == CLASSF) return 0x0;
+	return 0x0;
+}
+static bittype ovlarr[MAXREGS][1] = {
+{ 0x1f0301,  },
+{ 0x1e10c02,  },
+{ 0xe223004,  },
+{ 0x3244c008,  },
+{ 0x54880010,  },
+{ 0x69100020,  },
+{ 0x40,  },
+{ 0x80,  },
+{ 0x1f0101,  },
+{ 0x1f0201,  },
+{ 0x1e10402,  },
+{ 0x1e10802,  },
+{ 0xe221004,  },
+{ 0xe222004,  },
+{ 0x32444008,  },
+{ 0x32448008,  },
+{ 0x1ff0f03,  },
+{ 0xe3f3305,  },
+{ 0x325fc309,  },
+{ 0x549f0311,  },
+{ 0x691f0321,  },
+{ 0xfe33c06,  },
+{ 0x33e5cc0a,  },
+{ 0x55e90c12,  },
+{ 0x69f10c22,  },
+{ 0x3e66f00c,  },
+{ 0x5eaa3014,  },
+{ 0x6f323024,  },
+{ 0x76ccc018,  },
+{ 0x7b54c028,  },
+{ 0x7d980030,  },
+{ 0x80000000,  },
+{ 0x1,  },
+{ 0x2,  },
+{ 0x4,  },
+{ 0x8,  },
+{ 0x10,  },
+{ 0x20,  },
+{ 0x40,  },
+};
+int
+interferes(int reg1, int reg2)
+{
+return (TESTBIT(ovlarr[reg1], reg2)) != 0;
+}
Index: uspace/app/pcc/cc/ccom/arch/sparc64/external.h
===================================================================
--- uspace/app/pcc/cc/ccom/arch/sparc64/external.h	(revision e4f8c77d2f0ec68a5943a6b063aaa901dc22d1b4)
+++ uspace/app/pcc/cc/ccom/arch/sparc64/external.h	(revision e4f8c77d2f0ec68a5943a6b063aaa901dc22d1b4)
@@ -0,0 +1,27 @@
+// TODO: replace with file generated by ccom_mkext
+
+#ifndef _EXTERNAL_H_
+#define _EXTERNAL_H_
+#define MAXOPLEN 0
+#define NUMBITS 32
+#define BIT2BYTE(bits) ((((bits)+NUMBITS-1)/NUMBITS)*(NUMBITS/8))
+#define BITSET(arr, bit) (arr[bit/NUMBITS] |= ((int)1 << (bit & (NUMBITS-1))))
+#define BITCLEAR(arr, bit) (arr[bit/NUMBITS] &= ~((int)1 << (bit & (NUMBITS-1))))
+#define TESTBIT(arr, bit) (arr[bit/NUMBITS] & ((int)1 << (bit & (NUMBITS-1))))
+typedef int bittype;
+extern int tempregs[], permregs[];
+#define NTEMPREG 0
+#define FREGS 0
+#define NPERMREG 0
+extern bittype validregs[];
+#define AREGCNT 0
+#define BREGCNT 0
+#define CREGCNT 0
+#define DREGCNT 0
+#define EREGCNT 0
+#define FREGCNT 0
+#define GREGCNT 0
+int aliasmap(int class, int regnum);
+int color2reg(int color, int class);
+int interferes(int reg1, int reg2);
+#endif /* _EXTERNAL_H_ */
Index: uspace/app/pcc/cc/ccom/external.c
===================================================================
--- uspace/app/pcc/cc/ccom/external.c	(revision f48b637e784d7a891b9bca7b59a25dac35ea72b8)
+++ 	(revision )
@@ -1,243 +1,0 @@
-#include "pass2.h"
-static int op0[] = { -1 };
-static int op1[] = { -1 };
-static int op2[] = { 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 231, 233, -1 };
-static int op3[] = { -1 };
-static int op4[] = { 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 231, 233, -1 };
-static int op5[] = { 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 231, 233, -1 };
-static int op6[] = { 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 231, 233, -1 };
-static int op7[] = { 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 231, 233, -1 };
-static int op8[] = { 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 231, 233, -1 };
-static int op9[] = { 232, 233, -1 };
-static int op10[] = { 68, 69, 70, 71, 72, 73, 74, 75, 76, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 233, -1 };
-static int op11[] = { 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96, 233, -1 };
-static int op12[] = { 151, 152, 153, 154, 155, 156, 157, 233, -1 };
-static int op13[] = { 158, 159, 160, 161, 162, 233, -1 };
-static int op14[] = { 163, 164, 165, 166, 167, 168, 233, -1 };
-static int op15[] = { 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 183, 184, 185, 186, 187, 188, 189, 233, -1 };
-static int op16[] = { 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 233, -1 };
-static int op17[] = { 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 233, -1 };
-static int op18[] = { 97, 98, 99, 100, 101, 102, 103, 233, -1 };
-static int op19[] = { 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 233, -1 };
-static int op20[] = { 210, 211, 212, 213, 232, 233, -1 };
-static int op21[] = { -1 };
-static int op22[] = { -1 };
-static int op23[] = { 169, 170, 171, 172, 173, 174, 175, 227, 232, 233, -1 };
-static int op24[] = { 205, 206, 207, 208, 209, 232, 233, -1 };
-static int op25[] = { 176, 177, 178, 179, 180, 181, 182, 233, -1 };
-static int op26[] = { 176, 177, 178, 179, 180, 181, 182, 233, -1 };
-static int op27[] = { 176, 177, 178, 179, 180, 181, 182, 233, -1 };
-static int op28[] = { 176, 177, 178, 179, 180, 181, 182, 233, -1 };
-static int op29[] = { 176, 177, 178, 179, 180, 181, 182, 233, -1 };
-static int op30[] = { 176, 177, 178, 179, 180, 181, 182, 233, -1 };
-static int op31[] = { 176, 177, 178, 179, 180, 181, 182, 233, -1 };
-static int op32[] = { 176, 177, 178, 179, 180, 181, 182, 233, -1 };
-static int op33[] = { 176, 177, 178, 179, 180, 181, 182, 233, -1 };
-static int op34[] = { 176, 177, 178, 179, 180, 181, 182, 233, -1 };
-static int op35[] = { 233, -1 };
-static int op36[] = { 230, 232, 233, -1 };
-static int op37[] = { 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 232, 233, -1 };
-static int op38[] = { 1, 232, 233, -1 };
-static int op39[] = { 233, -1 };
-static int op40[] = { 233, -1 };
-static int op41[] = { 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 233, -1 };
-static int op42[] = { 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 232, 233, -1 };
-static int op43[] = { 233, -1 };
-static int op44[] = { 232, 233, -1 };
-static int op45[] = { 65, 66, 67, 233, -1 };
-static int op46[] = { 62, 63, 64, 232, 233, -1 };
-static int op47[] = { 231, 233, -1 };
-static int op48[] = { 233, -1 };
-static int op49[] = { 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 228, -1 };
-static int op50[] = { 150, 229, -1 };
-static int op51[] = { 226, 232, 233, -1 };
-static int op52[] = { 232, 233, -1 };
-static int op53[] = { 233, -1 };
-static int op54[] = { 190, 232, 233, -1 };
-static int op55[] = { -1 };
-static int op56[] = { 233, -1 };
-static int op57[] = { 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 232, 233, -1 };
-static int op58[] = { 232, 233, -1 };
-
-int *qtable[] = { 
-	op0,
-	op1,
-	op2,
-	op3,
-	op4,
-	op5,
-	op6,
-	op7,
-	op8,
-	op9,
-	op10,
-	op11,
-	op12,
-	op13,
-	op14,
-	op15,
-	op16,
-	op17,
-	op18,
-	op19,
-	op20,
-	op21,
-	op22,
-	op23,
-	op24,
-	op25,
-	op26,
-	op27,
-	op28,
-	op29,
-	op30,
-	op31,
-	op32,
-	op33,
-	op34,
-	op35,
-	op36,
-	op37,
-	op38,
-	op39,
-	op40,
-	op41,
-	op42,
-	op43,
-	op44,
-	op45,
-	op46,
-	op47,
-	op48,
-	op49,
-	op50,
-	op51,
-	op52,
-	op53,
-	op54,
-	op55,
-	op56,
-	op57,
-	op58,
-};
-int tempregs[] = { 0, 1, 2, -1 };
-int permregs[] = { 3, 4, 5, -1 };
-bittype validregs[] = {
-	0x7fffffff3f,
-};
-static int amap[MAXREGS][NUMCLASS] = {
-	/* 0 */{ 0x1,0x3,0x1f,0x0 },
-	/* 1 */{ 0x2,0xc,0x1e1,0x0 },
-	/* 2 */{ 0x4,0x30,0xe22,0x0 },
-	/* 3 */{ 0x8,0xc0,0x3244,0x0 },
-	/* 4 */{ 0x10,0x0,0x5488,0x0 },
-	/* 5 */{ 0x20,0x0,0x6910,0x0 },
-	/* 6 */{ 0x0,0x0,0x0,0x0 },
-	/* 7 */{ 0x0,0x0,0x0,0x0 },
-	/* 8 */{ 0x1,0x1,0x1f,0x0 },
-	/* 9 */{ 0x1,0x2,0x1f,0x0 },
-	/* 10 */{ 0x2,0x4,0x1e1,0x0 },
-	/* 11 */{ 0x2,0x8,0x1e1,0x0 },
-	/* 12 */{ 0x4,0x10,0xe22,0x0 },
-	/* 13 */{ 0x4,0x20,0xe22,0x0 },
-	/* 14 */{ 0x8,0x40,0x3244,0x0 },
-	/* 15 */{ 0x8,0x80,0x3244,0x0 },
-	/* 16 */{ 0x3,0xf,0x1ff,0x0 },
-	/* 17 */{ 0x5,0x33,0xe3f,0x0 },
-	/* 18 */{ 0x9,0xc3,0x325f,0x0 },
-	/* 19 */{ 0x11,0x3,0x549f,0x0 },
-	/* 20 */{ 0x21,0x3,0x691f,0x0 },
-	/* 21 */{ 0x6,0x3c,0xfe3,0x0 },
-	/* 22 */{ 0xa,0xcc,0x33e5,0x0 },
-	/* 23 */{ 0x12,0xc,0x55e9,0x0 },
-	/* 24 */{ 0x22,0xc,0x69f1,0x0 },
-	/* 25 */{ 0xc,0xf0,0x3e66,0x0 },
-	/* 26 */{ 0x14,0x30,0x5eaa,0x0 },
-	/* 27 */{ 0x24,0x30,0x6f32,0x0 },
-	/* 28 */{ 0x18,0xc0,0x76cc,0x0 },
-	/* 29 */{ 0x28,0xc0,0x7b54,0x0 },
-	/* 30 */{ 0x30,0x0,0x7d98,0x0 },
-	/* 31 */{ 0x0,0x0,0x0,0x1 },
-	/* 32 */{ 0x0,0x0,0x0,0x2 },
-	/* 33 */{ 0x0,0x0,0x0,0x4 },
-	/* 34 */{ 0x0,0x0,0x0,0x8 },
-	/* 35 */{ 0x0,0x0,0x0,0x10 },
-	/* 36 */{ 0x0,0x0,0x0,0x20 },
-	/* 37 */{ 0x0,0x0,0x0,0x40 },
-	/* 38 */{ 0x0,0x0,0x0,0x80 },
-};
-int
-aliasmap(int class, int regnum)
-{
-	return amap[regnum][class-1];
-}
-static int rmap[NUMCLASS][15] = {
-	{ 0, 1, 2, 3, 4, 5, },
-	{ 8, 9, 10, 11, 12, 13, 14, 15, },
-	{ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, },
-	{ 31, 32, 33, 34, 35, 36, 37, 38, },
-};
-
-int
-color2reg(int color, int class)
-{
-	return rmap[class-1][color];
-}
-int regK[] = { 0, 6, 8, 15, 8, 0, 0, 0 };
-int
-classmask(int class)
-{
-	if(class == CLASSA) return 0x3f;
-	if(class == CLASSB) return 0xff;
-	if(class == CLASSC) return 0x7fff;
-	if(class == CLASSD) return 0xff;
-	if(class == CLASSE) return 0x0;
-	if(class == CLASSF) return 0x0;
-	return 0x0;
-}
-static bittype ovlarr[MAXREGS][1] = {
-{ 0x1f0301,  },
-{ 0x1e10c02,  },
-{ 0xe223004,  },
-{ 0x3244c008,  },
-{ 0x54880010,  },
-{ 0x69100020,  },
-{ 0x40,  },
-{ 0x80,  },
-{ 0x1f0101,  },
-{ 0x1f0201,  },
-{ 0x1e10402,  },
-{ 0x1e10802,  },
-{ 0xe221004,  },
-{ 0xe222004,  },
-{ 0x32444008,  },
-{ 0x32448008,  },
-{ 0x1ff0f03,  },
-{ 0xe3f3305,  },
-{ 0x325fc309,  },
-{ 0x549f0311,  },
-{ 0x691f0321,  },
-{ 0xfe33c06,  },
-{ 0x33e5cc0a,  },
-{ 0x55e90c12,  },
-{ 0x69f10c22,  },
-{ 0x3e66f00c,  },
-{ 0x5eaa3014,  },
-{ 0x6f323024,  },
-{ 0x76ccc018,  },
-{ 0x7b54c028,  },
-{ 0x7d980030,  },
-{ 0x80000000,  },
-{ 0x1,  },
-{ 0x2,  },
-{ 0x4,  },
-{ 0x8,  },
-{ 0x10,  },
-{ 0x20,  },
-{ 0x40,  },
-};
-int
-interferes(int reg1, int reg2)
-{
-return (TESTBIT(ovlarr[reg1], reg2)) != 0;
-}
Index: uspace/app/pcc/cc/ccom/external.h
===================================================================
--- uspace/app/pcc/cc/ccom/external.h	(revision f48b637e784d7a891b9bca7b59a25dac35ea72b8)
+++ 	(revision )
@@ -1,25 +1,0 @@
-#ifndef _EXTERNAL_H_
-#define _EXTERNAL_H_
-#define MAXOPLEN 42
-#define NUMBITS 64
-#define BIT2BYTE(bits) ((((bits)+NUMBITS-1)/NUMBITS)*(NUMBITS/8))
-#define BITSET(arr, bit) (arr[bit/NUMBITS] |= ((long)1 << (bit & (NUMBITS-1))))
-#define BITCLEAR(arr, bit) (arr[bit/NUMBITS] &= ~((long)1 << (bit & (NUMBITS-1))))
-#define TESTBIT(arr, bit) (arr[bit/NUMBITS] & ((long)1 << (bit & (NUMBITS-1))))
-typedef long bittype;
-extern int tempregs[], permregs[];
-#define NTEMPREG 4
-#define FREGS 3
-#define NPERMREG 4
-extern bittype validregs[];
-#define AREGCNT 6
-#define BREGCNT 8
-#define CREGCNT 15
-#define DREGCNT 8
-#define EREGCNT 0
-#define FREGCNT 0
-#define GREGCNT 0
-int aliasmap(int class, int regnum);
-int color2reg(int color, int class);
-int interferes(int reg1, int reg2);
-#endif /* _EXTERNAL_H_ */
Index: uspace/app/pcc/cc/ccom/mkext/Makefile
===================================================================
--- uspace/app/pcc/cc/ccom/mkext/Makefile	(revision e4f8c77d2f0ec68a5943a6b063aaa901dc22d1b4)
+++ uspace/app/pcc/cc/ccom/mkext/Makefile	(revision e4f8c77d2f0ec68a5943a6b063aaa901dc22d1b4)
@@ -0,0 +1,47 @@
+#
+# Copyright (c) 2011 Jiri Zarevucky
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# - Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+# - Redistributions in binary form must reproduce the above copyright
+#   notice, this list of conditions and the following disclaimer in the
+#   documentation and/or other materials provided with the distribution.
+# - The name of the author may not be used to endorse or promote products
+#   derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+USPACE_PREFIX = ../../../../..
+MIPDIR = ../../../mip
+MDIR = ../../../arch/$(PLATFORM)
+OSDIR = ../../../os/helenos
+EXTRA_CFLAGS = -I$(MIPDIR) -I$(MDIR) -I$(OSDIR) -I. -w
+DEFS = -DMKEXT -Dmach_$(PLATFORM) -D__helenos__
+BINARY = cc_mkext
+
+POSIX_COMPAT = y
+
+# FIXME: external.{c,h} must be generated for each target system
+
+SOURCES = \
+	${MIPDIR}/mkext.c \
+	$(MDIR)/table.c \
+	${MIPDIR}/common.c
+
+include $(USPACE_PREFIX)/Makefile.common
+
