- Update the test cases for romcc

git-svn-id: svn://svn.coreboot.org/coreboot/trunk@817 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Eric Biederman 2003-05-08 00:31:34 +00:00
parent ab2ea6b474
commit ba8c25affb
4 changed files with 61 additions and 1 deletions

View File

@ -0,0 +1,18 @@
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
static void outb(uint8_t value, uint16_t port)
{
__builtin_outb(value, port);
}
static void main(void)
{
uint32_t i;
for(i = 0; i < 32; i++) {
outb(i, 0x80);
}
}

View File

@ -0,0 +1,39 @@
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
struct iter {
uint32_t i;
};
struct point {
uint32_t i, j;
};
static void outb(uint8_t value, uint16_t port)
{
__builtin_outb(value, port);
}
static struct point mkpoint(void)
{
struct point p;
p.i = 1000;
p.j = 2000;
return p;
}
static void main(void)
{
struct iter iter;
for(iter.i = 0; iter.i < 32; iter.i++) {
outb(iter.i, 0x80);
}
struct point p;
p = mkpoint();
outb(p.i, 0x80);
outb(p.j, 0x80);
}

View File

@ -0,0 +1,3 @@
static void main(void)
{
}

View File

@ -2,7 +2,7 @@
#define HAVE_CAST_SUPPORT 1
#define HAVE_STATIC_ARRAY_SUPPORT 1
#define HAVE_POINTER_SUPPORT 1
#define HAVE_CONSTANT_PROPOGATION 1
#define HAVE_CONSTANT_PROPOGATION 0
#define CALCULATE_DRB_REG 1
void outb(unsigned char value, unsigned short port)