Compare commits
2 commits
a643903a4b
...
93a5ae1c13
Author | SHA1 | Date | |
---|---|---|---|
DataHoarder | 93a5ae1c13 | ||
DataHoarder | 30d8190bcb |
|
@ -35,8 +35,9 @@ local XbpsPipeline(image, version, arch, extra="") = Pipeline(image, version, ar
|
|||
AptPipeline("ubuntu", "20.04", "amd64", "g++"),
|
||||
AptPipeline("ubuntu", "20.04", "arm64", "g++"),
|
||||
|
||||
AptPipeline("debian", "bullseye", "amd64", "g++"),
|
||||
AptPipeline("debian", "bullseye", "arm64", "g++"),
|
||||
AptPipeline("debian", "buster", "amd64", "g++"),
|
||||
AptPipeline("debian", "buster", "arm64", "g++"),
|
||||
|
||||
|
||||
YumPipeline("fedora", "latest", "amd64", "g++"),
|
||||
|
|
|
@ -58,6 +58,14 @@ std::vector<uint8_t> Instruction::Init::toBytes() const {
|
|||
std::unique_ptr<Instruction::Instruction>
|
||||
Instruction::Init::fromTokens(const Instruction::Instruction::parseOperatorResult &op,
|
||||
const std::vector<Token> &tokens) {
|
||||
//TODO
|
||||
return nullptr;
|
||||
return std::make_unique<Init>(
|
||||
AddressWithOffset{tokens.at(0).getNumericValue(), op.offset1}, 1, tokens.at(1).getNumericValue(), tokens.size() > 2 ? tokens.at(2).getNumericValue() : 0, tokens.size() > 3 ? tokens.at(3).getNumericValue() : 0);
|
||||
}
|
||||
|
||||
|
||||
std::unique_ptr<Instruction::Instruction>
|
||||
Instruction::Init::fromDirectTokens(const Instruction::Instruction::parseOperatorResult &op,
|
||||
const std::vector<Token> &tokens) {
|
||||
return std::make_unique<Init>(
|
||||
AddressWithOffset{tokens.at(0).getNumericValue(), op.offset1}, 0, tokens.at(1).getNumericValue(), tokens.size() > 2 ? tokens.at(2).getNumericValue() : 0, tokens.size() > 3 ? tokens.at(3).getNumericValue() : 0);
|
||||
}
|
|
@ -54,11 +54,14 @@ namespace Instruction {
|
|||
static std::unique_ptr<Instruction>
|
||||
fromTokens(const Instruction::parseOperatorResult &op, const std::vector<Token> &tokens);
|
||||
|
||||
static std::unique_ptr<Instruction>
|
||||
fromDirectTokens(const Instruction::parseOperatorResult &op, const std::vector<Token> &tokens);
|
||||
|
||||
AddressWithOffset address;
|
||||
uint8_t increment;
|
||||
uint32_t count;
|
||||
uint32_t data;
|
||||
uint32_t data_add;
|
||||
|
||||
AddressWithOffset address{};
|
||||
uint8_t increment{};
|
||||
uint32_t count{};
|
||||
uint32_t data{};
|
||||
uint32_t data_add{};
|
||||
};
|
||||
}
|
|
@ -82,11 +82,14 @@ namespace Instruction {
|
|||
addOperator("JUMP", 1, Jump::fromTokens);
|
||||
addOperator("RETURN", 1, Return::fromTokens);
|
||||
|
||||
//TODO INIT
|
||||
addOperator("WRITE", 2, Write::fromTokens);
|
||||
|
||||
addOperator("COPY", 2, Copy::fromTokens);
|
||||
|
||||
// INIT <R> <count> [data] [data_add]
|
||||
addOperator("INIT", 2, Init::fromTokens);
|
||||
addOperator("INIT_DIRECT", 2, Init::fromDirectTokens);
|
||||
|
||||
addOperator("LOAD", 2, Load::fromTokens);
|
||||
addOperator("LOAD_DIRECT", 2, Load::fromDirectTokens);
|
||||
|
||||
|
|
Loading…
Reference in a new issue