Displaying 20 results from an estimated 1000 matches similar to: "[LLVMdev] Instruction categories in the backend"
2004 Jun 07
2
[LLVMdev] Emitting assembler code
Hello,
I'm trying to write assembler code writer, and of course, have new questions.
I'd like the structure my implementation like this:
if (/*binary instruction*/) {
// print destination
O << " = ";
// print first operand
O << opcode;
// print second operand.
}
if (/* unary instruction */ ) {
....
}
if (/*control instruction*/) {
....
2008 Apr 15
4
[LLVMdev] Being able to know the jitted code-size before emitting
OK, here's a new patch that adds the infrastructure and the
implementation for X86, ARM and PPC of GetInstSize and GetFunctionSize.
Both functions are virtual functions defined in TargetInstrInfo.h.
For X86, I moved some commodity functions from X86CodeEmitter to
X86InstrInfo.
What do you think?
Nicolas
Evan Cheng wrote:
>
> I think both of these belong to TargetInstrInfo. And
2004 Jun 07
0
[LLVMdev] Emitting assembler code
On Mon, 7 Jun 2004, Vladimir Prus wrote:
>
> Hello,
> I'm trying to write assembler code writer, and of course, have new questions.
> I'd like the structure my implementation like this:
> if (/*binary instruction*/) {
> if (/* unary instruction */ ) {
> if (/*control instruction*/) {
Okay, that should be no problem.
> The question is how to write those
2010 Mar 25
1
[LLVMdev] TSFlagsFields and TSFlagsShifts obsolete?
I think we can get rid of the TSFlagsFields and TSFlagsShifts hack in the InstrInfo TableGen class now.
This seems to work just fine:
class Instruction {
bits<32> TSFlags;
}
class Domain<bits<2> val> {
bits<2> Value = val;
}
def GenericDomain : Domain<0>;
def SSEPackedInt : Domain<1>;
def SSEPackedSingle : Domain<2>;
def SSEPackedDouble :
2008 Oct 17
2
[LLVMdev] MFENCE encoding
Hi,
I have a problem with creating a MFENCE on X86 with SSE
In X86InstrSSE.td, a MFENCE is
def MFENCE : I<0xAE, MRM6m, (outs), (ins),
"mfence", [(int_x86_sse2_mfence)]>, TB, Requires<
[HasSSE2]>;
In X86CodeEmitter.cpp in emitInstruction
case X86II::MRM6m: case X86II::MRM7m: {
intptr_t PCAdj = (CurOp+4 != NumOps) ?
2018 Feb 09
2
[X86] MoveImm flag for instructions
I am trying to categorize the machine instructions based on associated
static (i.e., as encoded in .td file) machine description and the
corresponding APIs.
I would like to perform appropriate actions based on the kind of
instruction in a tool that I am working on.
For example, I'd like to distinguish between memop instructions involving
immediate vs register. While it appears that I would be
2016 Nov 28
2
RFC: code size reduction in X86 by replacing EVEX with VEX encoding
Hal, that’s a good point. There are more manually-maintained tables in the X86 backend that should probably be tablegened: the memory-folding tables and ReplaceableInstrs, to name a couple.
If you have ideas on how to get these auto-generated, please let us know.
From: llvm-dev [mailto:llvm-dev-bounces at lists.llvm.org] On Behalf Of Hal Finkel via llvm-dev
Sent: Wednesday, November 23, 2016
2018 Mar 08
2
Relationship between MachineMemOperand and X86II::getMemoryOperandNo
Hello,
I'm trying to understand the relationship between MachineMemOperand and, on
X86, memory operands of machine instructions. The latter seem to be
operands held in order by the MachineInstr, from an offset onwards - Base,
Scale, Index, Displacement, Segment. The former, if I understand it
correctly, is used to hold a relationship back to IR load/store
instructions.
Is it possible to have
2008 Oct 17
0
[LLVMdev] MFENCE encoding
Hmm. mfence and lfence needs special handling. I'll take a look.
Evan
On Oct 16, 2008, at 10:46 PM, Mon Ping Wang wrote:
> Hi,
>
> I have a problem with creating a MFENCE on X86 with SSE
>
> In X86InstrSSE.td, a MFENCE is
> def MFENCE : I<0xAE, MRM6m, (outs), (ins),
> "mfence", [(int_x86_sse2_mfence)]>, TB, Requires<
> [HasSSE2]>;
2008 Oct 17
1
[LLVMdev] MFENCE encoding
I've fixed this (untested though).
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20081013/068611.html
Evan
On Oct 17, 2008, at 9:51 AM, Evan Cheng wrote:
> Hmm. mfence and lfence needs special handling. I'll take a look.
>
> Evan
>
> On Oct 16, 2008, at 10:46 PM, Mon Ping Wang wrote:
>
>> Hi,
>>
>> I have a problem with creating a MFENCE
2018 Feb 09
0
[X86] MoveImm flag for instructions
I think even if we did use it, MoveImmediate is intended for instructions
that move an immediate into a register rather than into memory. It's
supposed to indicate instructions that can be folded with the user of the
register by changing the user to an immediate instruction. And it wouldn't
be set on an instruction like "addl $0, %eax" or "addl $0, (%ecx)" either
since
2018 Mar 08
0
Relationship between MachineMemOperand and X86II::getMemoryOperandNo
Hello Mircea,
> On 8 Mar 2018, at 18:52, Mircea Trofin via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
> Hello,
>
> I'm trying to understand the relationship between MachineMemOperand and, on X86, memory operands of machine instructions. The latter seem to be operands held in order by the MachineInstr, from an offset onwards - Base, Scale, Index, Displacement,
2017 Sep 04
2
Issues in Vector Add Instruction Machine Code Emission
Hello,
I am trying to emit binary for my implemented vector instructions. Although
yet i havent done any change or addition in MC framework, For vector load
instruction there are no error coming. But for vector add
instruction is something like this;
> %R_0_REG2048b_1<def> = P_256B_VADD %R_0_REG2048b_1<kill>,
%R_0_REG2048b_0<kill>
I am getting the following error:
Unknown
2017 Sep 04
2
Issues in Vector Add Instruction Machine Code Emission
Thank You.
My add instruction has TA as follows:
def P_256B_VADD : I<0xE1, MRMDestReg, (outs VRP_2048:$dst), (ins
VRP_2048:$src1, VRPIM_2048:$src2),"P_256B_VADD\t{$src1, $src2, $dst|$dst,
$src1, $src2}", [(set VRP_2048:$dst, (add (v64i32 VRP_2048:$src1), (v64i32
VRP_2048:$src2)))]>, TA;
so i defined;
bool HasTA = TSFlags & X86II::TA; in x86MCCodeEmitter.cpp
then used
2017 Sep 04
2
Issues in Vector Add Instruction Machine Code Emission
You are right. But when i defined my instruction as follows:
def P_256B_VADD : I<0xE1, MRMDestReg, (outs VRP_2048:$dst), (ins
VRP_2048:$src1, VRPIM_2048:$src2),"P_256B_VADD\t{$src1, $src2, $dst|$dst,
$src1, $src2}", [(set VRP_2048:$dst, (add (v64i32 VRP_2048:$src1), (v64i32
VRP_2048:$src2)))]>, VEX_4V;
I get opcode conflicts? Then what to do?
On Tue, Sep 5, 2017 at 3:51 AM,
2017 Sep 04
2
Issues in Vector Add Instruction Machine Code Emission
Sorry to ask but what does it mean to put both?
On Tue, Sep 5, 2017 at 4:01 AM, Craig Topper <craig.topper at gmail.com> wrote:
> Leave TA. Put both.
>
> ~Craig
>
> On Mon, Sep 4, 2017 at 4:00 PM, hameeza ahmed <hahmed2305 at gmail.com>
> wrote:
>
>> You are right. But when i defined my instruction as follows:
>> def P_256B_VADD : I<0xE1,
2018 Mar 09
1
Relationship between MachineMemOperand and X86II::getMemoryOperandNo
Thanks for the details!
How should we think of the case where an instruction has memory operands
(in the sense that X86II::getMemoryOperandNo >=0), but doesn't have
MachineMemOperands?
I'm seeing an example in the case of __builtin_prefetch (lowered via
SelectionDAG::getMemIntrinsicNode, which produces a MachineMemOperand) vs
__builtin_ia32_gatherpfdpd, lowered through getPrefetchNode
2017 Sep 05
2
Issues in Vector Add Instruction Machine Code Emission
I was getting same error when i keep both EVEX/EVEX_4V and TA. So, i
restored my original instructions and for that i have to include
bool HasTA = TSFlags & X86II::TA; in x86MCCodeEmitter.cpp
then used this condition;
if(HasTA)
++SrcRegNum;
in order to emit binary correctly.
Is it right?
On Tue, Sep 5, 2017 at 5:45 AM, Craig Topper <craig.topper at gmail.com> wrote:
>
2017 Sep 05
2
Issues in Vector Add Instruction Machine Code Emission
Thank You,
I changed TA to EVEX or EVEX_4V. But now i am getting following error:
Invalid prefix!
UNREACHABLE executed at
/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp:647!
On Tue, Sep 5, 2017 at 4:36 AM, Craig Topper <craig.topper at gmail.com> wrote:
> Not all instructions can use EVEX_4V. Move instructions in particular
> cannot because they don't have 2 sources.
>
2008 Apr 16
0
[LLVMdev] Being able to know the jitted code-size before emitting
Comments below.
On Apr 15, 2008, at 4:24 AM, Nicolas Geoffray wrote:
> OK, here's a new patch that adds the infrastructure and the
> implementation for X86, ARM and PPC of GetInstSize and
> GetFunctionSize. Both functions are virtual functions defined in
> TargetInstrInfo.h.
>
> For X86, I moved some commodity functions from X86CodeEmitter to
> X86InstrInfo.
>