mirror of
https://github.com/irmen/prog8.git
synced 2026-04-21 02:16:41 +00:00
%align directive and @align64
This commit is contained in:
@@ -234,6 +234,7 @@ class IRCodeGen(
|
||||
chunk += IRInstruction(Opcode.BREAKPOINT)
|
||||
listOf(chunk)
|
||||
}
|
||||
is PtAlign -> TODO("ir support for inline %align")
|
||||
is PtConditionalBranch -> translate(node)
|
||||
is PtInlineAssembly -> listOf(IRInlineAsmChunk(null, node.assembly, node.isIR, null))
|
||||
is PtIncludeBinary -> listOf(IRInlineBinaryChunk(null, readBinaryData(node), null))
|
||||
@@ -254,7 +255,7 @@ class IRCodeGen(
|
||||
is PtBool,
|
||||
is PtArray,
|
||||
is PtBlock,
|
||||
is PtDefer -> throw AssemblyError("defer should have been transformed")
|
||||
is PtDefer -> throw AssemblyError("should have been transformed")
|
||||
is PtString -> throw AssemblyError("should not occur as separate statement node ${node.position}")
|
||||
is PtSub -> throw AssemblyError("nested subroutines should have been flattened ${node.position}")
|
||||
else -> TODO("missing codegen for $node")
|
||||
@@ -1675,6 +1676,7 @@ class IRCodeGen(
|
||||
is PtNop -> { /* nothing */ }
|
||||
is PtAssignment, is PtAugmentedAssign -> { /* global variable initialization is done elsewhere */ }
|
||||
is PtVariable, is PtConstant, is PtMemMapped -> { /* vars should be looked up via symbol table */ }
|
||||
is PtAlign -> TODO("ir support for inline %align")
|
||||
is PtSub -> {
|
||||
val sub = IRSubroutine(child.name, translate(child.parameters), child.returntype, child.position)
|
||||
for (subchild in child.children) {
|
||||
|
||||
@@ -48,7 +48,7 @@ class TestVmCodeGen: FunSpec({
|
||||
"pi",
|
||||
DataType.UBYTE,
|
||||
ZeropageWish.DONTCARE,
|
||||
PtVariable.Alignment.NONE,
|
||||
0u,
|
||||
PtNumber(DataType.UBYTE, 0.0, Position.DUMMY),
|
||||
null,
|
||||
Position.DUMMY
|
||||
@@ -57,7 +57,7 @@ class TestVmCodeGen: FunSpec({
|
||||
"particleX",
|
||||
DataType.ARRAY_UB,
|
||||
ZeropageWish.DONTCARE,
|
||||
PtVariable.Alignment.NONE,
|
||||
0u,
|
||||
null,
|
||||
3u,
|
||||
Position.DUMMY
|
||||
@@ -66,7 +66,7 @@ class TestVmCodeGen: FunSpec({
|
||||
"particleDX",
|
||||
DataType.ARRAY_UB,
|
||||
ZeropageWish.DONTCARE,
|
||||
PtVariable.Alignment.NONE,
|
||||
0u,
|
||||
null,
|
||||
3u,
|
||||
Position.DUMMY
|
||||
@@ -75,7 +75,7 @@ class TestVmCodeGen: FunSpec({
|
||||
"xx",
|
||||
DataType.WORD,
|
||||
ZeropageWish.DONTCARE,
|
||||
PtVariable.Alignment.NONE,
|
||||
0u,
|
||||
PtNumber(DataType.WORD, 1.0, Position.DUMMY),
|
||||
null,
|
||||
Position.DUMMY
|
||||
@@ -159,7 +159,7 @@ class TestVmCodeGen: FunSpec({
|
||||
"f1",
|
||||
DataType.FLOAT,
|
||||
ZeropageWish.DONTCARE,
|
||||
PtVariable.Alignment.NONE,
|
||||
0u,
|
||||
null,
|
||||
null,
|
||||
Position.DUMMY
|
||||
@@ -230,7 +230,7 @@ class TestVmCodeGen: FunSpec({
|
||||
"f1",
|
||||
DataType.FLOAT,
|
||||
ZeropageWish.DONTCARE,
|
||||
PtVariable.Alignment.NONE,
|
||||
0u,
|
||||
null,
|
||||
null,
|
||||
Position.DUMMY
|
||||
@@ -297,7 +297,7 @@ class TestVmCodeGen: FunSpec({
|
||||
"f1",
|
||||
DataType.FLOAT,
|
||||
ZeropageWish.DONTCARE,
|
||||
PtVariable.Alignment.NONE,
|
||||
0u,
|
||||
null,
|
||||
null,
|
||||
Position.DUMMY
|
||||
@@ -352,7 +352,7 @@ class TestVmCodeGen: FunSpec({
|
||||
"sb1",
|
||||
DataType.BYTE,
|
||||
ZeropageWish.DONTCARE,
|
||||
PtVariable.Alignment.NONE,
|
||||
0u,
|
||||
null,
|
||||
null,
|
||||
Position.DUMMY
|
||||
@@ -423,7 +423,7 @@ class TestVmCodeGen: FunSpec({
|
||||
"sb1",
|
||||
DataType.BYTE,
|
||||
ZeropageWish.DONTCARE,
|
||||
PtVariable.Alignment.NONE,
|
||||
0u,
|
||||
null,
|
||||
null,
|
||||
Position.DUMMY
|
||||
@@ -490,7 +490,7 @@ class TestVmCodeGen: FunSpec({
|
||||
"ub1",
|
||||
DataType.UBYTE,
|
||||
ZeropageWish.DONTCARE,
|
||||
PtVariable.Alignment.NONE,
|
||||
0u,
|
||||
null,
|
||||
null,
|
||||
Position.DUMMY
|
||||
|
||||
Reference in New Issue
Block a user