mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-20 21:27:52 -04:00
5093b97cda
* wip decompiler ir * add AtomicOp stuff * fix windows build and warnings * add instruction parser * include * make minilzo shared * odr fix * a * fix merge conflicts * move decompiler into namespace * update the code coverage to include the decompiler * add demo test * add register use test to example test
38 lines
970 B
C++
38 lines
970 B
C++
#pragma once
|
|
|
|
/*!
|
|
* @file LinkedWord.h
|
|
* A word (4 bytes), possibly with some linking info.
|
|
*/
|
|
|
|
#ifndef JAK2_DISASSEMBLER_LINKEDWORD_H
|
|
#define JAK2_DISASSEMBLER_LINKEDWORD_H
|
|
|
|
#include <cstdint>
|
|
#include <string>
|
|
|
|
namespace decompiler {
|
|
class LinkedWord {
|
|
public:
|
|
explicit LinkedWord(uint32_t _data) : data(_data) {}
|
|
|
|
enum Kind {
|
|
PLAIN_DATA, // just plain data
|
|
PTR, // pointer to a location
|
|
HI_PTR, // lower 16-bits of this data are the upper 16 bits of a pointer
|
|
LO_PTR, // lower 16-bits of this data are the lower 16 bits of a pointer
|
|
SYM_PTR, // this is a pointer to a symbol
|
|
EMPTY_PTR, // this is a pointer to the empty list
|
|
SYM_OFFSET, // this is an offset of a symbol in the symbol table
|
|
TYPE_PTR // this is a pointer to a type
|
|
} kind = PLAIN_DATA;
|
|
|
|
uint32_t data = 0;
|
|
|
|
int label_id = -1;
|
|
std::string symbol_name;
|
|
};
|
|
} // namespace decompiler
|
|
|
|
#endif // JAK2_DISASSEMBLER_LINKEDWORD_H
|