Updated to latest CVS. Added changes to normal_loop: got
rid of some unnecessrary jumps. To get rid of gotos could
do nested while(1)s, though it makes the code wide from
indention(reason why I stayed with goto).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
usage of mem_readd_inline(address-1) in mem_unalignedreadw
can result in wrong linear addresses for pagefaults, might
create problems when something checks against a forced
value of cr2 (unlikely though).
in mem_memcpy, you used size&1 followed by a 1-byte copy
to get a word count, but this results in a lot of unaligned
memory reads/writes if src and dest were word-aligned and
size is a non-even value. Shouldn't alignment be done
according to the src first, then the cutting with size&1?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Been a long time since I've look at this. I hadn't considered the first condition and the second, wouldn't it be virtual alignnment? I did a rewrite test like you described and it wasn't happy with the odd byte shore up, after the fact.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Referring to dosbox virtual addressing vs real host addressing. If I recall, I profiled it at the time but to be sure you'd probably want to recheck it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=1008467
Updated to latest CVS. Added changes to normal_loop: got
rid of some unnecessrary jumps. To get rid of gotos could
do nested while(1)s, though it makes the code wide from
indention(reason why I stayed with goto).
Logged In: YES
user_id=1304940
Thank you for your work!
Some questions about the memory function changes:
usage of mem_readd_inline(address-1) in mem_unalignedreadw
can result in wrong linear addresses for pagefaults, might
create problems when something checks against a forced
value of cr2 (unlikely though).
in mem_memcpy, you used size&1 followed by a 1-byte copy
to get a word count, but this results in a lot of unaligned
memory reads/writes if src and dest were word-aligned and
size is a non-even value. Shouldn't alignment be done
according to the src first, then the cutting with size&1?
Logged In: YES
user_id=1008467
Been a long time since I've look at this. I hadn't considered the first condition and the second, wouldn't it be virtual alignnment? I did a rewrite test like you described and it wasn't happy with the odd byte shore up, after the fact.
Logged In: YES
user_id=1304940
Virtual pages are always 4k-aligned, so it shouldn't matter.
Or do you mean the word-strings at odd addresses?
Logged In: YES
user_id=1008467
Referring to dosbox virtual addressing vs real host addressing. If I recall, I profiled it at the time but to be sure you'd probably want to recheck it.