projects
/
sx
/
simavr.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
regExp
home
|
summary
|
tags
|
heads
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
raw
|
patch
| inline |
side by side
(parent:
f4b8df2
)
Commit
e0e85ba6e358f9d5b757671e1a7d236f522f3bb4
author
Michel Pollet
<buserror@gmail.com>
Wed, 25 Aug 2010 15:07:31 +0000
(16:07 +0100)
committer
Michel Pollet
<buserror@gmail.com>
Wed, 25 Aug 2010 15:07:31 +0000
(16:07 +0100)
Swap LSB and MSB of return address on the stack.
Thanks to "Peter" on the simavr mailing list.
Signed-off-by: Michel Pollet <buserror@gmail.com>
simavr/sim/sim_core.c
patch
|
blob
|
history
|
download
diff --git
a/simavr/sim/sim_core.c
b/simavr/sim/sim_core.c
index 06f4f4529058d7629cf7b09e686b974d29c74cfd..ebb4646c97c9af8bbc673d4a2fad9de1d9411166 100644
(file)
--- a/
simavr/sim/sim_core.c
+++ b/
simavr/sim/sim_core.c
@@
-230,14
+230,14
@@
static inline uint8_t _avr_pop8(avr_t * avr)
inline void _avr_push16(avr_t * avr, uint16_t v)
{
- _avr_push8(avr, v >> 8);
_avr_push8(avr, v);
+ _avr_push8(avr, v >> 8);
}
static inline uint16_t _avr_pop16(avr_t * avr)
{
- uint16_t res = _avr_pop8(avr);
- res |= _avr_pop8(avr)
<< 8
;
+ uint16_t res = _avr_pop8(avr)
<< 8
;
+ res |= _avr_pop8(avr);
return res;
}