vortex runtime console out implementation

This commit is contained in:
Blaise Tine
2021-06-15 04:01:44 -04:00
parent ee06337553
commit 6213b1a910
18 changed files with 78144 additions and 78036 deletions

View File

@@ -3,15 +3,9 @@
.type vx_putchar, @function
.global vx_putchar
vx_putchar:
la t0, print_addr
lw t0, 0(t0)
csrr t1, CSR_GTID
slli t1, t1, 16
or t1, t1, a0
sw t1, 0(t0)
ret
.section .data
print_addr:
.word IO_COUT_ADDR
csrr t0, CSR_GTID
andi t0, t0, %lo(IO_COUT_SIZE-1)
li t1, IO_COUT_ADDR
add t0, t0, t1
sb a0, 0(t0)
ret

View File

@@ -64,7 +64,7 @@ static const char* skip_modifier(const char* format) {
break;
case 'j':
case 'z':
case 't':
case 't':
case 'L':
++format;
break;
@@ -123,10 +123,10 @@ int vx_vprintf(const char* format, va_list va) {
int vx_printf(const char * format, ...) {
va_list va;
va_start(va, format);
va_start(va, format);
int ret = vx_vprintf(format, va);
va_end(va);
return ret;
va_end(va);
return ret;
}
static const char hextoa[] = "0123456789abcdef";