From 87ab8941edb69a84979068fe74718f8a12b43262 Mon Sep 17 00:00:00 2001 From: Quentin Carbonneaux Date: Mon, 7 Sep 2015 21:59:45 -0400 Subject: start work on aggregate types The parser now has some code to parse the description of structured types. I tried to be even less specific than LLVM "type" by creating just enough abstraction so that I can deal with both AARCH64 and x64. The base types used in the definition of an aggregate are really just syntactic sugar to give a structure a size and an alignment. Only the location of float components matters for the compilation. In particular this means that the front-ends have to know how the ABI works to pass/return small integer types. This also means that the font-end has to be aware of the layout of structures. Chris Lattner has a proposition [1] for LLVM that is still pending and goes in the direction of giving more control of the ABI the front-end. [1]: http://www.nondot.org/sabre/LLVMNotes/ExtendedIntegerResults.txt --- lisc/isel.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lisc/isel.c') diff --git a/lisc/isel.c b/lisc/isel.c index 795380a..6d7e7af 100644 --- a/lisc/isel.c +++ b/lisc/isel.c @@ -178,8 +178,8 @@ sel(Ins i, Fn *fn) n = i.op == OStorel; goto Emit; case OLoad: - case OLoadss: - case OLoadus: + case OLoadsh: + case OLoaduh: case OLoadsb: case OLoadub: if (cpy[0].s) { @@ -264,8 +264,8 @@ flagi(Ins *i0, Ins *i) case OStoreb: case OStores: case OLoad: - case OLoadss: - case OLoadus: + case OLoadsh: + case OLoaduh: case OLoadsb: case OLoadub:; } -- cgit 1.4.1