Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request for developer notes/docs for AVR target backend #2

Open
anubane opened this issue Jun 6, 2023 · 0 comments
Open

Request for developer notes/docs for AVR target backend #2

anubane opened this issue Jun 6, 2023 · 0 comments

Comments

@anubane
Copy link

anubane commented Jun 6, 2023

This is neither a bug report nor any issue pertaining to the upstream (LLVM) codebase.

I wish to understand the process and implementation workflow for AVR target backend for LLVM. Since the repository itself does not contain any documentation, this is a request for just the same.

an example of things that the docs/notes may explain: in the file AVRRegisterInfo.td

.
.
//===----------------------------------------------------------------------===//
//  Declarations that describe the AVR register file
//===----------------------------------------------------------------------===//

// 8-bit General purpose register definition.
class AVRReg<bits<16> num, string name, list<Register> subregs = [],
             list<string> altNames = []> : RegisterWithSubRegs<name, subregs> {
  field bits<16> Num = num;

  let HWEncoding = num;
  let Namespace = "AVR";
  let SubRegs = subregs;
  let AltNames = altNames;
}
.
.
.
def R26 : AVRReg<26, "r26", [], ["xl"]>, DwarfRegNum<[26]>;
def R27 : AVRReg<27, "r27", [], ["xh"]>, DwarfRegNum<[27]>;
def R28 : AVRReg<28, "r28", [], ["yl"]>, DwarfRegNum<[28]>;
def R29 : AVRReg<29, "r29", [], ["yh"]>, DwarfRegNum<[29]>;
def R30 : AVRReg<30, "r30", [], ["zl"]>, DwarfRegNum<[30]>;
def R31 : AVRReg<31, "r31", [], ["zh"]>, DwarfRegNum<[31]>;
.
.
.

Now, as per all architecture documents I can find for Atmel AVR, I do not understand what are the subregisters. So the design process in the TableGen is not clear to me. These details may be covered by some developer notes/documentations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant