Files
BlitzNext/compiler/lib/assem_x86/operand.hpp
T

25 lines
495 B
C++
Raw Normal View History

2019-01-19 18:28:07 +01:00
#pragma once
#include <iostream>
#include <string>
struct Operand {
int mode;
int reg, imm, offset;
std::string immLabel, baseLabel;
int baseReg, indexReg, shift;
Operand();
Operand(const std::string& s);
void parse();
private:
std::string s;
bool parseSize(int* sz);
bool parseChar(char c);
bool parseReg(int* reg);
bool parseFPReg(int* reg);
bool parseLabel(std::string* t);
bool parseConst(int* iconst);
};