Blue Swirl a écrit :
>> According to the SPARCv8 and SPARCv9 manuals, the jmpl, rett and return
>> instructions should generate a mem_address_not_aligned trap if either
>> of the low-order two bits of the target address is nonzero.
> 
> This is true, but in that case alignment should be enforced for loads ands 
> stores as well. The checks also incur a performance penalty for little 
> advantage. Maybe the checks should be enabled only with a compile/run-time 
> option.
> 

I also have a patch for load/store, but openbios is doing a few
unaligned memory accesses, so the patch can't be used until openbios is
fixed.

I haven't made any benchmark, but the performance penality is probably
very small. If you look at softmmu_template.h, you will see that it only
adds a if test, while the whole function is already a few dozen of lines
long.

I would really like to see the QEMU having the same behaviour as real
hardware, this allow for example debugging SIGBUS problems in a program
without having real hardware.

-- 
  .''`.  Aurelien Jarno             | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   [EMAIL PROTECTED]         | [EMAIL PROTECTED]
   `-    people.debian.org/~aurel32 | www.aurel32.net


Reply via email to