[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Simulavr-devel] [patch #7079] Trace fixes and better memory access
From: |
Petr Hluzin |
Subject: |
[Simulavr-devel] [patch #7079] Trace fixes and better memory access |
Date: |
Sun, 31 Jan 2010 22:13:48 +0000 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; cs; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7 |
URL:
<http://savannah.nongnu.org/patch/?7079>
Summary: Trace fixes and better memory access
Project: Simulavr: an AVR simulator
Submitted by: petrh
Submitted on: Sun 31 Jan 2010 11:13:47 PM CET
Category: bug fix
Priority: 5 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Component Version: simulavrxx
_______________________________________________________
Details:
avr_op_ADIW::Trace( ) - did print register and the constant swapped (see
ctor)
avr_op_BRBS::Trace( ) - printed bogus value as a destination (BRBS is 2B
instruction)
avr_op_BSET::Trace( ) - printed using bogus index (get_reg_bit vs
get_sreg_bit in ctor)
avr_op_CALL::Trace( ) - printed uninitialized value as address
avr_op_DEC::Trace( ) - printed bogus second argument
avr_op_LPM_Z::Trace() - did not print the written-to register
(Remaining changes are not user-visible.)
These were found while adjusting the code for different handling of memory
access: reading/writing (after this patch) goes through device first. (I have
to tinker with it and RWMemoryWithOwnMemory would be ugly.)
pros:
* nicer ctors
* easier peeking into simulavr while debugging
* smaller DecodedInstruction instances (by ~3*4B)
* reduced cache pressure
* allows more efficient (cache friendly) storage of data memory (not yet in
this patch)
* less chance for wrong *::Trace() code or wrong X,Y,Z read
cons:
* uglier *::operator()
* 1 more hot field in AvrDevice
* unaligned access to fields in instructions
HWStack::HWStack() has one less argument, all devices have to be trivially
adjusted.
Some instructions still have HWSreg* status - we can get rid of that. (I do
not need that though.)
The DecodedInstruction ctor still accepts the extra arguments after this
patch.
I would remove them but one my diff tool gets confused by that many changes
(yours may too).
I can prepare another patch that just removes the extra arguments if you
like.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Sun 31 Jan 2010 11:13:47 PM CET Name: memory-access.patch Size: 105kB
By: petrh
<http://savannah.nongnu.org/patch/download.php?file_id=19586>
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/patch/?7079>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Simulavr-devel] [patch #7079] Trace fixes and better memory access,
Petr Hluzin <=