URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Subversion Repositories or1k
Compare Revisions
- This comparison shows the changes necessary to convert path
/
- from Rev 1397 to Rev 1398
- ↔ Reverse comparison
Rev 1397 → Rev 1398
/trunk/or1ksim/cpu/common/abstract.h
140,6 → 140,8
/* Returns 32-bit values from mem array. */ |
uint32_t eval_insn(oraddr_t, int *); |
|
uint8_t eval_direct8(oraddr_t memaddr, int *breakpoint, int through_mmu, int through_dc); |
uint16_t eval_direct16(oraddr_t memaddr, int *breakpoint, int through_mmu, int through_dc); |
uint32_t eval_direct32(oraddr_t addr, int *breakpoint, int through_mmu, int through_dc); |
|
void set_direct32(uint32_t addr, uint32_t value, int *breakpoint, int through_mmu, int through_dc); |
/trunk/or1ksim/support/simprintf.c
54,8 → 54,8
fmtaddr = regparam; |
|
i = 0; |
while (eval_direct8(fmtaddr,&breakpoint) != '\0') { |
fmtstr[i++] = eval_direct8(fmtaddr,&breakpoint); |
while (eval_direct8(fmtaddr,&breakpoint,1,0) != '\0') { |
fmtstr[i++] = eval_direct8(fmtaddr,&breakpoint,1,0); |
fmtaddr++; |
if (i == FMTLEN - 1) |
break; |
100,7 → 100,7
int string = 0; |
debug(6, " 3"); |
#if STACK_ARGS |
arg = eval_direct32(argaddr,&breakpoint); |
arg = eval_direct32(argaddr,&breakpoint,1,0); |
argaddr += 4; |
#else |
{ |
110,7 → 110,8
arg = evalsim_reg(atoi(regstr)); |
} |
#endif |
debug(6, " 4: fmtstrpart=%p fmtstrpart=%s arg=%p\n", fmtstrpart, fmtstrpart, arg); |
debug(6, " 4: fmtstrpart=%p fmtstrpart=%s arg=0x%08"PRIx32"\n", |
fmtstrpart, fmtstrpart, arg); |
tmp = fmtstrpart; |
if (*tmp == '%') { |
tmp++; |
120,14 → 121,14
if (string) { |
int len = 0; |
char *str; |
for(; eval_direct8(arg++,&breakpoint); len++); |
for(; eval_direct8(arg++,&breakpoint,1,0); len++); |
len++; /* for null char */ |
arg -= len; |
str = (char *)malloc(len); |
len = 0; |
for(; eval_direct8(arg,&breakpoint); len++) |
*(str+len) = eval_direct8(arg++,&breakpoint); |
*(str+len) = eval_direct8(arg,&breakpoint); /* null ch */ |
for(; eval_direct8(arg,&breakpoint,1,0); len++) |
*(str+len) = eval_direct8(arg++,&breakpoint,1,0); |
*(str+len) = eval_direct8(arg,&breakpoint,1,0); /* null ch */ |
debug(6, "4a: len=%d str=%s\n", len, str); |
debug(6, "4b:"); |
fprintf(f, fmtstrpart, str); |