Displaying 20 results from an estimated 20000 matches similar to: "[RFC] Checking inline assembly for validity"
2015 Oct 23
3
[AMDGPU] AMDGPUAsmParser fails to parse several instructions
Dear Developers,
I compile a OpenCL kernel, FFT, in AMDAPP SDK v2.5 using clang 3.8 + libclc
and assembling the code with lld (The LLVM linker). The assembly code
contains the following assembly codes (and lots of other similar format
assembly) that fails to be parsed by AMDGPUAsmParser. It seems to me that
both are valid instructions after looking at the SI instruction spec.
s_mov_b32 s0,
2013 Feb 05
2
[LLVMdev] AsmParser for backend
Hi,
I try to create a backend to support AsmParser, but it hasn't the red part as below. I find the Mips has this. Do you know how to make it appear?
Jonathan
#ifdef GET_ASSEMBLER_HEADER
#undef GET_ASSEMBLER_HEADER
// This should be included into the middle of the declaration of
// your subclasses implementation of MCTargetAsmParser.
unsigned ComputeAvailableFeatures(uint64_t
2013 Feb 05
0
[LLVMdev] AsmParser for backend
Jonathan <gamma_chen at yahoo.com.tw> wrote:
> I try to create a backend to support AsmParser, but it hasn't the red
part
> as below. I find the Mips has this. Do you know how to make it appear?
>
> Jonathan
>
> #ifdef GET_ASSEMBLER_HEADER
> #undef GET_ASSEMBLER_HEADER
> // This should be included into the middle of the declaration of
> // your subclasses
2019 Mar 25
2
Printing PC-relative offsets - how to get the instruction length?
Hi
In my MC6809 backend, in llvm/lib/Target/MC6809/InstPrinter/MC6809InstPrinter.cpp, I have the routine
void MC6809InstPrinter::printPCRelImmOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O) {
const MCOperand &Op = MI->getOperand(OpNo);
ZZ
if (Op.isImm()) {
int64_t Imm = Op.getImm() + 2; <<<========================
O << "$";
if (Imm
2013 Apr 23
4
[LLVMdev] [PATCH] Handle tied sub-operands in AsmMatcherEmitter
Hi Ulrich,
Thank you for looking at this. Apologies again for taking unjustifiably long to get back to you. This is really good stuff and I very much want to see this go in. I like it enough I’m going to try to talk you into doing even more work on improving this code. ;)
Fair warning up front: You’re digging into some pretty fundamental problems in how the assemblers and code generators like to
2018 Mar 22
2
ARM Backend BuildMI operand issues
Hello everyone,
I'm working on a MachineFunctionPass that inserts a list of instructions
into an Module so a later Pass can work on them.
To do so I load a dummy .ll file created from a main stub, create the
needed function stubs (ModulePass), insert Blocks and create
instructions using BuildMI.
I started with branch instructions:
const TargetMachine &TM = MF.getTarget();
2013 Apr 24
0
[LLVMdev] [PATCH] Handle tied sub-operands in AsmMatcherEmitter
Hi Jim,
> Thank you for looking at this. Apologies again for taking
> unjustifiably long to get back to you. This is really good stuff and
> I very much want to see this go in. I like it enough I’m going to
> try to talk you into doing even more work on improving this code. ;)
>
> Fair warning up front: You’re digging into some pretty fundamental
> problems in how the
2018 Mar 23
1
ARM Backend BuildMI operand issues
Thank you for your help Tom
you are totally right with the registers but the command you suggest
also doesn't work.
After some research I found the following thread on the mailing list:
http://lists.llvm.org/pipermail/llvm-dev/2017-February/110086.html
With your help and the information about the condition codes I was able
to resolve the error:
BuildMI(BB, BB.end(), DL,
2013 Feb 20
1
[LLVMdev] Question about accessing coprocesser register in prologue
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130220/a080958f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 201302201044290_44YDXKW4.gif
Type: image/gif
Size: 14036 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130220/a080958f/attachment.gif>
2018 Mar 22
0
ARM Backend BuildMI operand issues
On 03/22/2018 09:29 AM, Julius Hiller via llvm-dev wrote:
> Hello everyone,
>
> I'm working on a MachineFunctionPass that inserts a list of instructions into an Module so a later Pass can work on them.
> To do so I load a dummy .ll file created from a main stub, create the needed function stubs (ModulePass), insert Blocks and create instructions using BuildMI.
> I started with
2015 Dec 07
2
Immediate value boundary checking
Dear all,
I have written an assembler which reads assembly instructions and produces
the equivalent binary. I have a problem. Although I set the bit range and
immediate type for an instruction like add which accepts a register and an
immediate value, I can simply overflow that value and llvm/tablegen doesn't
care!
for example for a i8imm imm value (bits<8> val) these two produce the
2012 Sep 26
2
[LLVMdev] What does MCOperand model?
A question for LLVM code generator developers:
After having read through "The LLVM Target-Independent Code Generator"
[1] I'm unclear about what precisely the objects MCInst and MCOperand
represent. They sit in the space between assembly syntax and binary
encodings, but which are they modeling? For example, a Thumb 2 branch
instruction 'b' takes an immediate. That syntax
2012 Sep 26
0
[LLVMdev] What does MCOperand model?
Owen is correct in his descriptions. The MCOperand values are intended to model the instruction encoding. Where that doesn't match the assembly syntax, the asm parser (and codegen) and the instruction printer are responsible for encoding/decoding the values.
For targets that predate the MC layer, this isn't always the case, leading to things being a bit confusing when just reading the
2018 Sep 28
3
error: expected memory with 32-bit signed offset
Hi,
I want to encode Loongson ISA initially
https://gist.github.com/xiangzhai/8ae6966e2f02a94e180dd16ff1cd60ac
gslbx $2,0($3,$4)
It is equivalent to:
dadd $1, $3, $4
lb $2,0($1)
I just use mem_simmptr as the default value of DAGOperand MO ,
because MipsMemAsmOperand use parseMemOperand to parse general
MemOffset and only *one* AnyRegister , for example:
0($1)
But
2012 Dec 23
5
[LLVMdev] Getting MCInst "ins" and "outs"
Hi all.
I'm looking for some way to do code analysis with LLVM. Can someone please give me a hint, if it is possible to query an MCInst for what are input operands and what are output operands?
Small example.
Consider we have an instruction:
str r1, [sp, #8]
Being mapped into MCInst instance it has the following operands:
<MCOperand Reg:61> <-- maps to reg r1
2018 Jun 26
2
MachineFunction Instructions Pass using Segment Registers
This shouldn't have parsed.
movq (%gs), %r14
That's trying to use%gs as a base register which isn't valid. GNU assembler
rejects it. And coincidentally llvm-mc started rejecting it on trunk late
last week. That's probably why it printed as %ebp.
I don't know if there is an instruction to read the base of %gs directly.
Maybe rdgsbase, but that's only available on Ivy
2018 Jul 10
6
[RISCV][PIC] Lowering pseudo instructions in MCCodeEmitter vs AsmPrinter
H all,
I'm looking at generating PIC code for RISC-V in the context of Linux. Not
sure if anyone is working on this already, any inputs are very welcome.
I'm now looking at function calls which in the RISCV backend are
represented via two pseudoinstructions RISCV::TAIL and RISCV::CALL.
Currently those pseudos are lowered in MCCodeEmitter. They are expanded
into AUIPC and JALR
2010 Feb 15
2
[LLVMdev] Botched Build
On Feb 15, 2010, at 12:53 PM, Chris Lattner wrote:
>
> On Feb 15, 2010, at 10:00 AM, David Greene wrote:
>
>> On Monday 15 February 2010 11:54:25 Óscar Fuentes wrote:
>>> David Greene <dag at cray.com> writes:
>>>> Sorry, I botched a commit and broke the build. I've just committed a
>>>> fix.
>>>>
>>>> So expect
2019 Nov 26
6
[RFC] Displaying source variable locations in llvm-objdump
Hi llvm-dev,
I've uploaded a prototype patch at https://reviews.llvm.org/D70720 which
adds a new feature to llvm-objdump: displaying the location (in
registers/memory/etc) of source-level variables alongside the disassembly
display. I've put a demo of the output at https://reviews.llvm.org/M2.
I have two use-cases in mind for this:
* Users reading the disassembly of compiled code. It
2018 Jun 24
2
MachineFunction Instructions Pass using Segment Registers
The size suffix thing is a weird quirk in our assembler I should look into
fixing. Instructions in at&t syntax usually have a size suffix that is
often optional
For example:
add %ax, %bx
and
addw %ax, %bx
Are equivalent because the register name indicates the size.
but for an instruction like this
addw $1, (%ax)
There is nothing to infer the size from so an explicit suffix is