Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UINT64 value is copied into UINT32 value in WriteToSet() in champsim_tracer.cpp #301

Open
YashikaVerma156 opened this issue Jan 4, 2023 · 4 comments
Labels

Comments

@YashikaVerma156
Copy link

For writing source_memory/destination_memory addresses when a call is made to WriteToSet(T* begin, T* end, UINT32 r), 64bit value is copied to UINT32 r.

Source memory and destination memory operands are declared as 64bit wide in instruction.h
uint64_t destination_memory[NUM_INSTR_DESTINATIONS_SPARC] = {};
uint64_t source_memory[NUM_INSTR_SOURCES] = {};

Hence the ChampSim trace have inaccurate value for memory operands.

@alberto-ros
Copy link
Collaborator

From what I can see, the value passed to "r" is the register number, not the register content. So 32 bits should be more than enough. Am I missing something here?

@YashikaVerma156
Copy link
Author

Actually, WriteToSet(T* begin, T* end, UINT32 r) is used for both memory and register operands.
So, for register number i.e. when register operands are extracted, it is fine. But, while extracting the memory addresses the 64-bit memory address is copied to UINT32 r, which is wrong.

@alberto-ros
Copy link
Collaborator

I see. You are right. Something to be fixed. Perhaps the best way is to do a pull request fixing the problem.

@YashikaVerma156
Copy link
Author

ok, sure.

@ngober ngober added the bug label Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants