Displaying 20 results from an estimated 700 matches similar to: "[SelectionDAG] [TargetOp] How to get sub-half of immediate?"
2018 Mar 09
0
[SelectionDAG] [TargetOp] How to get sub-half of immediate?
Hi Kevin,
To get some portion of a constant immediate you can use SDNodeXForms to
transform constant SDNodes into other values. For a worked example, in the
MIPS backend we use this for constant synthesis by materializing the value into a
register:
(From lib/Target/MipsInstrInfo.td):
// Transformation Function - get the lower 16 bits.
def LO16 : SDNodeXForm<imm, [{
return getImm(N,
2007 Jan 09
2
[LLVMdev] Pattern matching questions
On Tue, 9 Jan 2007, Evan Cheng wrote:
>> - How does one deal with multiple instruction sequences in a pattern?
>> To load a constant is a two instruction sequence, but both
>> instructions only take two operands (assume that r3 is a 32-bit
>> register):
>>
>> ilhu $3, 45 # r3 = (45 << 16)
>> iohl $3, 5 # r3 |= 5
2007 Jan 09
3
[LLVMdev] Pattern matching questions
I was able to resolve my previous question about dealing with custom
loads/stores, and following Chris' suggestion, the IBM Cell SPU backend
can generate code for "int main(void) { return 0; }" without crashing
llc. There's a lot of work still to be done... like getting frame
offsets correctly computed and hauling in the raft of intrinsics that
the Cell SDK defines.
Three quick
2008 Sep 23
2
[LLVMdev] Multi-Instruction Patterns
Are there any examples of using tablegen to generate multiple machine
instructions from a single pattern? Or do these cases always have to be
manually expanded?
-Dave
2007 Jan 10
0
[LLVMdev] Pattern matching questions
Chris Lattner wrote:
>>It is possible to write multi-instruction pattern, e.g.
>>X86InstrSSE.td line 1911. But how are you defining HI16 and LO16?
>>Sounds like you want to define them as SDNodeXform that returns upper
>>and lower 16 bits respectively. Take a look at PSxLDQ_imm in
>>X86InstrSSE.td as an example.
>
>
> Another good example is the PPC
2007 Jan 09
0
[LLVMdev] Pattern matching questions
On Jan 9, 2007, at 10:01 AM, Scott Michel wrote:
> I was able to resolve my previous question about dealing with custom
> loads/stores, and following Chris' suggestion, the IBM Cell SPU
> backend
> can generate code for "int main(void) { return 0; }" without crashing
> llc. There's a lot of work still to be done... like getting frame
> offsets correctly
2007 Mar 22
1
[LLVMdev] Backend: 2 address + 17bit immediate
Hello,
Im (trying) to write a backend for a simple 32bit processor architecture,
with a single instruction format having no condition code registers.
www.docm.mmu.ac.uk/STAFF/A.Nisbet/Sabre.pdf is the short 15 page document
describing the architecture of Sabre. It is a Celoxica developed
research/teaching processor, pages 5-8 contain relevant information for
targetting it from a new compiler
2008 Sep 23
0
[LLVMdev] Multi-Instruction Patterns
On Sep 23, 2008, at 11:26 AM, David Greene wrote:
> Are there any examples of using tablegen to generate multiple machine
> instructions from a single pattern? Or do these cases always have
> to be
> manually expanded?
PPC has a bunch of examples, for example:
// Arbitrary immediate support. Implement in terms of LIS/ORI.
def : Pat<(i32 imm:$imm),
(ORI (LIS (HI16
2015 Nov 22
2
[lld] R_MIPS_HI16 / R_MIPS_LO16 calculation
On Sun, Nov 22, 2015 at 1:28 AM, Rui Ueyama <ruiu at google.com> wrote:
> I'm not sure if I understand the semantics of HI16 and LO16 relocations. If
> my understanding is correct, a pair of HI16 and LO16 represents an addend
> AHL. AHL is computed by (AHI<<16) | (ALO&0xFFFF). Can't we apply HI16 and
> LO16 relocations separately and produce the same relocation
2014 Aug 15
2
[LLVMdev] Help with definition of subregisters; spill, rematerialization and implicit uses
Hi,
I have a problem regarding sub-register definitions and LiveIntervals on
our target. When a subregister is defined, other parts of the register
are always left untouched - they are neither read or def:ed.
It however seems that Codegen treats subregister definitions as somehow
clobbering the whole register.
The SSA-code looks like this after isel:
(Reg0 and Reg1 are 16bit registers. Reg2,
2014 Aug 19
2
[LLVMdev] Help with definition of subregisters; spill, rematerialization and implicit uses
Hi Quentin,
On 08/15/14 19:01, Quentin Colombet wrote:
[...]
>> The question is: How should true subregister definitions be
>> expressed so that they do not interfere with each other? See the
>> detailed problem description below.
>
> We do have a limitation in our current liveness tracking for
> sub-register. Therefore, I am not sure that is possible.
>
>
2015 Nov 21
2
[lld] R_MIPS_HI16 / R_MIPS_LO16 calculation
On Sat, Nov 21, 2015 at 10:08 AM, Rui Ueyama <ruiu at google.com> wrote:
> On Fri, Nov 20, 2015 at 11:02 PM, Simon Atanasyan <simon at atanasyan.com>
> wrote:
>>
>> On Sat, Nov 21, 2015 at 9:28 AM, Rui Ueyama <ruiu at google.com> wrote:
>> > On Fri, Nov 20, 2015 at 10:13 PM, Simon Atanasyan <simon at atanasyan.com>
>> > wrote:
>>
2011 May 19
3
[LLVMdev] subregisters, def-kill
Hi,
I am combining 16-bit registers to a 32 bit register in order to make a wide store, as per below:
732 %reg16506:hi16<def,dead> = COPY %reg16445<kill>;
740 %reg16506:lo16<def> = COPY %reg16468<kill>;
748 %r3<def,dead> = store %reg16506<kill>, %r3,
As you can see, LiveVariables has marked the high part dead, even though the super-register is used at
2011 May 19
0
[LLVMdev] subregisters, def-kill
On May 19, 2011, at 7:47 AM, Jonas Paulsson wrote:
> Hi,
>
> I am combining 16-bit registers to a 32 bit register in order to make a wide store, as per below:
>
> 732 %reg16506:hi16<def,dead> = COPY %reg16445<kill>;
> 740 %reg16506:lo16<def> = COPY %reg16468<kill>;
> 748 %r3<def,dead> = store %reg16506<kill>, %r3,
>
> As you can
2015 Nov 21
2
[lld] R_MIPS_HI16 / R_MIPS_LO16 calculation
On Sat, Nov 21, 2015 at 9:28 AM, Rui Ueyama <ruiu at google.com> wrote:
> On Fri, Nov 20, 2015 at 10:13 PM, Simon Atanasyan <simon at atanasyan.com>
> wrote:
>>
>> In case of MIPS O32 ABI we have to find a matching R_MIPS_LO16
>> relocation to calculate R_MIPS_HI16 one because R_MIPS_HI16 uses
>> combined addend (AHI << 16) + (short)ALO where AHI is
2012 Jan 24
1
[LLVMdev] Req-sequence, partial defs
Hi,
I'm having an issue with subregisters on my target.
With a pseudo that writes to a 32 bit reg:
%vreg20<def> = toHi16_low0_pseudo %vreg2; reg32:%vreg20 hi16:%vreg2
expands to
%vreg2<def> = COPY %a2h; hi16:%vreg2
%vreg43<def> = mov 0, pred:0, pred:%noreg, %ac0<imp-use>, %ac1<imp-use>; lo16:%vreg43
%vreg20<def> =
2011 May 20
1
[LLVMdev] subregisters, def-kill
If I write
%reg16506<def> = INSERT_SUBREG %reg16506, %reg16445, hi16; #1
%reg16506<def> = INSERT_SUBREG %reg16506, %reg16468, lo16; #2
store %reg16506 #3
it will not coalesce, as
LiveVariables:
on
#2: %16506 gets #2 as a kill
#3: %16506 gets #3 as an additional kill
LiveIntervalAnalysis:
2015 Nov 21
2
[lld] R_MIPS_HI16 / R_MIPS_LO16 calculation
Hi,
I am working on support R_MIPS_HI16 / R_MIPS_LO16 in the new LLD and
have a couple of questions.
== Q1
In case of MIPS O32 ABI we have to find a matching R_MIPS_LO16
relocation to calculate R_MIPS_HI16 one because R_MIPS_HI16 uses
combined addend (AHI << 16) + (short)ALO where AHI is original
R_MIPS_HI16 addend and ALO is addend of the matching R_MIPS_LO16
relocation [1]. There are two
2010 Nov 17
1
[LLVMdev] [llvm-commits] [patch] ARM/MC/ELF add new stub for movt/movw in ARMFixupKinds
+llvmdev
-llvmcommits
On Fri, Nov 12, 2010 at 8:03 AM, Jim Grosbach <grosbach at apple.com> wrote:
> Sorta. getBinaryCodeForInst() is auto-generated by tablegen, so shouldn't be modified directly. The target can register hooks for instruction operands for any special encoding needs, including registering fixups, using the EncoderMethod string. For an example, have a look at the
2014 Aug 22
2
[LLVMdev] Help with definition of subregisters; spill, rematerialization and implicit uses
Hi Quentin,
On 08/19/14 18:58, Quentin Colombet wrote:
[...]
> It seems that you will have to debug further the *** Bad machine code: Instruction loads from dead spill slot *** before we can be of any help.
Yes, I've done some more digging. Sorry for the long mail...
I get:
Inline spilling aN40_0_7:%vreg1954 [5000r,5056r:0)[5056r,5348r:1)
0 at 5000r 1 at 5056r
At this point I have