Files
BlitzNext/compiler/lib/assem_x86/operand.hpp
T
Michael Fabian 'Xaymar' Dirks c4947bd12a compiler: Move and modernize
compiler is blitzcc, what I previously called compiler is now compiler_lib
2019-01-19 18:28:07 +01:00

25 lines
495 B
C++

#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);
};