Displaying 20 results from an estimated 1000 matches similar to: "Accessing TableGen defined variable in the cpp code"
2015 Sep 28
3
Parse Instruction
Hi ES,
From what I understand instruction parsing is divided into two parts:
- Parsing an operand list (XXXAsmParser::ParseInstruction)
- Turning the operand list into an actual instruction
(XXXAsmParser::MatchAndEmitInstruction)
The second part does the validation (e.g. how many operands, what kind,
etc) while the first part only does the parsing. That's why I think in
the first part
2015 Sep 28
2
Parse Instruction
Hi all,
in most of the architectures, assembly operands are comma-separated.
I would like to parse an assembly code that is space-separated and I am
having a bit of problem.
In *ParseInstruction* function, I don't know what is the easiest way to
figure out how many operands a mnemonic expected to have.
In comma-separated assembly code, it just consuming commas (while
2012 Oct 17
3
[LLVMdev] Hexagon Assembly parser question
Hi,
I'm trying to enable the hexagon LLVM assembly parser. It seem like there
is a lot of work that has been done to make this parsing straightforward.
But..
Hexagon assembly does not follow the "Mnemonic Rx Rx ." format that is
expected by the assembly parsing infrastructure, represented by:
StringRef Mnemonic = ((ARMOperand*)Operands[0])->getToken();
This
2012 Oct 17
0
[LLVMdev] Hexagon Assembly parser question
On Oct 17, 2012, at 3:29 PM, David Young <davidy at codeaurora.org> wrote:
> Hi,
> I’m trying to enable the hexagon LLVM assembly parser. It seem like there is a lot of work that has been done to make this parsing straightforward.
>
> But….
> Hexagon assembly does not follow the “Mnemonic Rx Rx …” format that is expected by the assembly parsing infrastructure,
2010 Jun 21
2
[LLVMdev] MC: Object file specific parsing
Hi Daniel,
attached is a patch that pushes most of the object file specific parsing
out of AsmParser and down into MachOAsmParser. This was done as a
cleanup for the ELF work. I know that you're not happy with this
approach, particularly the fact that as we add more object file formats
and assembler dialects, it's going to cause a class explosion. But I was
hoping that we could use this
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 May 10
0
[LLVMdev] MC Hammer Test results
Hello everyone
At EuroLLVM I presented some testing work we have been doing on improving
correctness of the MC Layer for ARM. There seemed to be interest from the
community in seeing the results of this test suite.
Background
-----------
We are using a test suite, called MC Hammer, that compares MC with an ARM
in-house implementation of the same functionality. The test space for this suite
is
2016 Sep 13
2
what is official way to determine if we are running lto 2nd stage?
Hi,
Imagine that your backend has valid asm instruction written like this:
"%x mnem %y, %z"
And user puts it as inline assembler:
__asm__ ("%x mnem %y, %z");
It can not be parsed with current llvm asm parser, because it starts
with % (moreover it has mnemonic in second place)
Say you written pass, that makes it "mnem %x, %y, %z".
Now this guy can be parsed, but
2011 Aug 11
1
[LLVMdev] New ARM disassembler - unpredictable instructions
On Aug 11, 2011, at 1:32 AM, James Molloy wrote:
> Hi,
>
> I’m looking at the new ARM disassembler, and performing testing to see if there are any obvious bugs I can fix. Overall it looks really nice – I’ve only found one obvious bug that I’m packaging up a patch for now.
Glad you're liking it! I haven't really done comprehensive testing yet—it passes all the decoding tests
[LLVMdev] Question about porting LLVM - a single instruction op mnemonic with multiple operand forms
2011 Jan 18
4
[LLVMdev] Question about porting LLVM - a single instruction op mnemonic with multiple operand forms
Hello all,
I am at the adding Instruction Set stage of adding new target support into
LLVM. There is a single instruction op mnemonic with multiple operand forms.
For example: Add R1, R2 & Add @R1, R2. I found that there is similar case in
x86 instruction set, such like ADD reg, reg & ADD mem, reg. However, the
solution of x86 is adding suffix of instruction and translating instruction
op
2011 Jun 22
3
[LLVMdev] ARM thumb-2 instruction used for non-thumb2 CPUs
On Jun 22, 2011, at 3:16 PM, Renato Golin wrote:
> On 22 June 2011 11:49, Damjan Marion <damjan.marion at gmail.com> wrote:
>> # /opt/llvm/bin/clang -S -ccc-host-triple arm-unknown-freebsd -mcpu=arm926ej-s -mfloat-abi=soft -v -o rrx.S rrx.c
>
> Even though you specified cpu as arm9, it's probably generating
> generic ARM IR (use -emit-llvm -S and see), which defaults
[LLVMdev] Question about porting LLVM - a single instruction op mnemonic with multiple operand forms
2011 Jan 18
1
[LLVMdev] Question about porting LLVM - a single instruction op mnemonic with multiple operand forms
Hello Villmow,
Is it your backend EFI Byte Code Virtual Machine?? Would you mind to give me
an example about what pseudo instruction you add??
thanks a lot
yi-hong
2011/1/19 Villmow, Micah <Micah.Villmow at amd.com>
> I have this same problem in our backend. I solve it by adding a pseudo
> instruction at instruction selection that transforms @R1 into R1, so only a
> single
2016 Jan 22
2
fptosi undefined behaviour
On 22 January 2016 at 12:20, Tom Stellard via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
>> 1) I realise this is a somewhat silly question, but is this still
>> acceptable "undefined behaviour"?
>
> Yes, it is.
I always thought these out-of-range instructions did produce an
"undef" rather than allowing fully-general undefined behaviour
(otherwise we
2016 Jul 08
2
Dynamic selection of assembly mnemonic strings
Thanks for the quick answer Bruce.
So far as I can tell (from a quick read), this is really for integrated assemblers/disassemblers - but we use an external assembler. When invoking clang we would provide ‘-mcpu=chip_v1’ or ‘-mcpu=chip_v2’, and the mnemonic ‘LD32’ is only valid when compiling for ‘chip_v1’, while ‘LD.32’ is only valid when compiling for ‘chip_v2’. But I will study the
[LLVMdev] Question about porting LLVM - a single instruction op mnemonic with multiple operand forms
2011 Jan 18
0
[LLVMdev] Question about porting LLVM - a single instruction op mnemonic with multiple operand forms
I have this same problem in our backend. I solve it by adding a pseudo instruction at instruction selection that transforms @R1 into R1, so only a single pattern is required. I then can propogate the pseudo instruction after instruction selection.
Micah
From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Lu Mitnick
Sent: Tuesday, January 18, 2011 10:29 AM
2017 Feb 04
2
How to get assembly opcode mnemonic(s) corresponding to a MachineInstr?
Hi,
I'd like to modify MachineBasicBlock contents within a
MachineFunctionPass on the basis of how many CPU cycles the assembly
instructions corresponding to the MBB take. I'm using the AVR backend
and the number of CPU cycles every AVR assembly operation takes is
openly available.
Is there any straightforward way of getting the opcode mnemonics
corresponding to a MachineInstr? I've
2016 Jul 08
2
Dynamic selection of assembly mnemonic strings
Hi LLVM Dev,
I have an old problem that I've wanted to clean-up for some time. Our chip
has gone through a number of iterations in the past few years, but with each
revision there have been changes to some of the mnemonics for instructions.
These are mostly very simple, for example we had a 32-bit load from memory
instruction named 'LD32' in one version of the chip, but for a
2011 Jun 22
2
[LLVMdev] ARM thumb-2 instruction used for non-thumb2 CPUs
On Jun 22, 2011, at 10:03 AM, Damjan Marion wrote:
>
> On Jun 22, 2011, at 6:15 PM, Jim Grosbach wrote:
>
>>
>> On Jun 22, 2011, at 9:00 AM, Renato Golin wrote:
>>
>>> On 22 June 2011 16:50, Jim Grosbach <grosbach at apple.com> wrote:
>>>>> This sounds like a dead end as newer binutils are GPLv3.
>>>>
>>>> Yeah,
2011 Jun 22
0
[LLVMdev] ARM thumb-2 instruction used for non-thumb2 CPUs
On Jun 22, 2011, at 7:27 PM, Jim Grosbach wrote:
>> I will try to find those pre-v3 patches.
>>
>> In meantime I wrote a patch which changes to old mnemonics for shift instructions.
>> This fixes compiling on the freebsd.
>
> If this is really the only issue you're seeing, we may be lucky and your binutils already have support for lots of the changes necessary
2016 Feb 17
2
Getting MachineInstr opcode mnemonics as strings
Hello all,
Is there an easy way to get the human-readable opcode mnemonic (e.g.,
"MOV32ri64", "CMP32ri8", "JLE_1") for a MachineInstr? I am writing a
backend analysis pass for security research, where the idea is for a
researcher to examine the output of my pass and identify instructions
from it for use in an attack. Right now I'm representing unique