Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 1043 → Rev 1049

/uspace/trunk/init/init.c
33,7 → 33,7
#include <stdlib.h>
#include <ns.h>
 
/*
 
static void test_printf(void)
{
printf("Simple text.\n");
40,12 → 40,14
printf("Now insert '%s' string.\n","this");
printf("We are brave enought to print numbers like %%d = '%d'\n", 0x123456);
printf("And now... '%b' byte! '%w' word! '%W' Word! \n", 0x12, 0x1234, 0x1234);
printf(" '%Q' Q! Another '%q' q! \n", 0x1234567887654321ll, 0x1234567887654321ll);
printf(" '%P' with 64bit value and '%p' with 32 bit value. \n", 0x1234567887654321ll, 0x12345678 );
printf("'%Q' Q! Another '%q' q! \n", 0x1234567887654321ll, 0x1234567887654321ll);
printf("'%Q' with 64bit value and '%p' with 32 bit value. \n", 0x1234567887654321ll, 0x12345678 );
printf("'%Q' 64bit, '%p' 32bit, '%b' 8bit, '%w' 16bit, '%Q' 64bit and '%s' string.\n", 0x1234567887654321ll, 0x12345678, 0x12, 0x1234, 0x1234567887654321ull, "Lovely string" );
printf("Thats all, folks!\n");
}
*/
 
 
extern char _heap;
static void test_mremap(void)
{
161,6 → 163,7
{
version_print();
 
/* test_printf(); */
// test_ping();
// test_async_ipc();
test_advanced_ipc();
/uspace/trunk/libc/arch/mips32/include/stackarg.h
34,24 → 34,19
 
#include <types.h>
 
typedef struct va_list {
int pos;
uint8_t *last;
} va_list;
 
#define va_start(ap, lst) \
(ap).pos = sizeof(lst); \
(ap).last = (uint8_t *) &(lst)
 
/**
* va_arg macro for MIPS32 - problem is that 64 bit values must be aligned on an 8-byte boundary (32bit values not)
* To satisfy this, paddings must be sometimes inserted.
*/
#define va_arg(ap, type) \
(*((type *)((ap).last + ((ap).pos += sizeof(type) + ((sizeof(type) == 8) && (((ap).pos)&4) ? 4 : 0)) - sizeof(type))))
 
#define va_end(ap)
typedef uint8_t* va_list;
 
#define va_start(ap, lst) \
((ap) = (va_list)&(lst) + sizeof(lst))
 
#define va_arg(ap, type) \
(((type *)((ap) = (va_list)( (sizeof(type) <= 4) ? ((uint32_t)((ap) + 2*4 - 1) & (~3)) : ((uint32_t)((ap) + 2*8 -1) & (~7)) )))[-1])
 
#define va_end(ap)
 
#endif