search for: imm8

Displaying 20 results from an estimated 30 matches for "imm8".

Did you mean: imm
2015 Jan 19
2
[LLVMdev] X86TargetLowering::LowerToBT
Which BTQ? There are three flavors. BTQ reg/reg BTQ reg/mem BTQ reg/imm I can imagine that the reg/reg and especially the reg/mem versions would be slow. However the shrq/and versions *with the same operands* would be slow as well. There's even a compiler comment about the reg/mem version saying "this is for disassembly only". But I doubt BTQ reg/imm would be microcoded. -- Ite
2008 May 08
1
[LLVMdev] PPC Isel complex patterns
Hi all, I have problem with specifying complex patterns in PPC Isel backend. I would like to fetch few instructions into one like that: def MatchPAT1 : Pat<(or (or (shl GPRC:$rA, (i32 imm:$imm24)), (and (shl GPRC:$rA, (i32 imm:$imm8)), 0xFF0000) ), (or (srl GPRC:$rA, (i32 imm:$imm24)), (and (shl GPRC:$rA, (i32 imm:$imm8)),0xFF00) )), (myinstr GPRC:$rA)>; That pattern corresponds to i32 bswap intrinsic. The thing is that such complex pattern matching does not work. I can specify really simple patterns like: shl...
2008 Jan 22
1
[LLVMdev] llvm useability?
...generates better code for them ? I'm a bit disappointed about the llvm-gcc 2.0 I tried for my iPod Touch as I saw it generated ARM code not very optimically : r7(apparently used like a frame pointer even when -fomit-frame-pointer is given) largely overused, generated code like "mov rx, imm8;orr rx, rx, imm8';add rx, rx, ry" instead of "add rx, ry, imm8;add rx, rx, imm8'", etc. I'm also wondering if the official SDK expected for February offers a llvm-gcc as a c/c++ compiler. Which version ? Regards. On 21/01/2008 22:55:30, Chris Lattner (sabre at nondo...
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
2019 Apr 14
2
[A bug?] Failed to use BuildMI to add R7 - R12 registers for tADDi8 and tPUSH of ARM
...tion in LLVM for thumb2 add. Probably starting with t2 instead of t. The definition of tADDi8 looks like this. Where tGPR specifically means R0-R7. def tADDi8 : // A8.6.4 T2 T1sItGenEncodeImm<{1,1,0,?,?}, (outs tGPR:$Rdn), (ins tGPR:$Rn, imm0_255:$imm8), IIC_iALUi, "add", "\t$Rdn, $imm8", [(set tGPR:$Rdn, (add tGPR:$Rn, imm8_255:$imm8))]>, Sched<[WriteALU]>; ~Craig On Sun, Apr 14, 2019 at 12:21 PM Jie Zhou <jzhou41 at cs.rochester.edu<mailto:jz...
2013 Oct 17
0
[LLVMdev] llvm-objdump disassembling jmp
...0 > 2: c3 ret > > Is this intended behavior? > I haven't looked at the source code but I'm guessing that llvm-objdump is just being "dumb" in the sense that the disassembly API's probably just return the imm8 as the raw field value and llvm-objdump is just printing that, rather than actually interpreting it as an address (relative to the instruction). In other words, binutils objdump is printing the operand of the JMP as the address it jumps to, while llvm-objdump is printing the raw imm8 field value. T...
2013 Oct 17
2
[LLVMdev] llvm-objdump disassembling jmp
In creating a test case for a bug fix in llvm-objdump, I noticed that it differs in its output of pc-relative immediates from objdump: [secdev:/tmp] s$ cat a.s main: jmp .LBL0 .LBL0: ret [secdev:/tmp] s$ llvm-mc -filetype=obj a.s > a.o [secdev:/tmp] s$ objdump -d a.o |tail -n 2 0: eb 00 jmp 2 <main+0x2> 2: c3 retq
2019 Mar 25
2
Printing PC-relative offsets - how to get the instruction length?
...; <MCOperand Imm:0> ; <MCOperand Imm:1000>> I still get the 8-bit variant instead of LDAi16oPC, and the operand is truncated. The TableGen-generated .inc file has { 444 /* lda */, MC6809::LDAi8oPC, Convert__imm_95_0__Imm81_0, AMFBS_None, { MCK_Imm8, MCK_PC }, }, { 444 /* lda */, MC6809::LDAi16oPC, Convert__imm_95_0__Imm161_0, AMFBS_None, { MCK_Imm16, MCK_PC }, }, ... so how do I get the 16-bit variant with MCK_Imm16 selected instead? The instructions are defined as def LDAi8oPC : MC6809LoadIndexed_i8oPC_P1<...
2019 Apr 14
2
[A bug?] Failed to use BuildMI to add R7 - R12 registers for tADDi8 and tPUSH of ARM
Sorry for not being specific enough. ARMv7-M includes Thumb and Thumb2. It has 12 regular registers (R0 - R12), and R8 - R12 are used. I can generate mov instruction that from/ R8-R12 to/from R0-R6. From this ARM page http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0068b/ch03s03s01.html R9 - R12 have their conventional usage, but I don’t if this is the reason we cannot use them
2012 May 14
7
[PATCH v3] Fix the mistake of exception execution
...+ break; + + case TRAP_overflow: + type = X86_EVENTTYPE_SW_EXCEPTION; /* into; CE */ + break; + default: - if ( trap > TRAP_last_reserved ) - { - type = X86_EVENTTYPE_SW_EXCEPTION; - __vmwrite(VM_ENTRY_INSTRUCTION_LEN, 2); /* int imm8 */ - } break; } @@ -2447,6 +2457,11 @@ void vmx_vmexit_handler(struct cpu_user_ if ( handled < 0 ) { vmx_inject_exception(TRAP_int3, HVM_DELIVER_NO_ERROR_CODE, 0); + /* + * Accor...
2013 Jul 11
0
[LLVMdev] [PATCH] x86: disambiguate unqualified btr, bts
On Wed, Jul 10, 2013 at 7:15 PM, Jim Grosbach <grosbach at apple.com> wrote: > > On Jul 10, 2013, at 6:54 PM, Stephen Checkoway <s at pahtak.org> wrote: > > On Jul 10, 2013, at 17:44, Jim Grosbach <grosbach at apple.com> wrote: > > The length specifier is, as I understand it, required when the instruction > references memory but is optional (and inferred from
2013 Jul 11
2
[LLVMdev] [PATCH] x86: disambiguate unqualified btr, bts
On Jul 10, 2013, at 6:54 PM, Stephen Checkoway <s at pahtak.org> wrote: > On Jul 10, 2013, at 17:44, Jim Grosbach <grosbach at apple.com> wrote: >> The length specifier is, as I understand it, required when the instruction references memory but is optional (and inferred from the registers) for the register variants. >> >> The best reference I know of for the
2013 Jul 13
2
[LLVMdev] [PATCH] x86: disambiguate unqualified btr, bts
...ee Figure 3-2). The offset operand then selects a bit position within the range −231 to 231 − 1 for a register offset and 0 to 31 for an immediate offset. However, this doesn't seem to be true if the immediate value is greater than 15. See the attached imm.c which prints the results of bts m16,imm8 (btsw) and bts m32,imm8 (btsl) with the immediate in [0,63]. For btsw, only the least significant 4 bits of the immediate seem to be used whereas for btsl, only the least significant 5 bits seem to be used. In contrast, bts m16,r16 (btsw) and bts m32,r32 (btsl) are identical for bit offset operand...
2016 Oct 12
2
Generate Register Indirect mode instruction
...ine void @foo(i32 *%a) { entry: %0 = load i32, i32* %a, align 4 %add = add i32 %0, 3 store i32 %add, i32* %a, align 4 ret void } On x86, this gets turned into: addl $3, (%rdi) retq From X86InstrArithmetic.td: // BinOpMI8_RMW - Instructions like "add [mem], imm8". class BinOpMI8_RMW<string mnemonic, X86TypeInfo typeinfo, SDPatternOperator opnode, Format f> : BinOpMI8<mnemonic, typeinfo, f, [(store (opnode (load addr:$dst), typeinfo.Imm8Operator:$src), addr:$dst),...
2012 Aug 23
0
[LLVMdev] % in tablegen
...ed an example (not the original). Note that i added %prefix_ before $sp register. Tablegen seems to interpret % as placeholder for inserting register. Is there any way to make tablgen ignore the %? I have tried '\' character, and two "%%". None worked. // ADD <Rd>, sp, #<imm8> // This is rematerializable, which is particularly useful for taking the // address of locals. let isReMaterializable = 1 in def tADDrSPi : T1I<(outs tGPR:$dst), (ins GPR:$sp, t_imm_s4:$rhs), IIC_iALUi, "add\t$dst, %prefix_$sp, $rhs", []>, T1Enc...
2007 Apr 13
0
[Patch] Fix some bugs in mmio decoder
Some instructions, like "add $imm8, r/m16"/"MOV $imm32, r/m64" require the src immediate operand be sign-extented befere the op is executed, but this is omitted in the current Xcode. The patch fixes this. The patch also fixes an issue in handling address-size override prefix, and fixes an issue in get_immediate(). Si...
2015 Feb 03
2
[LLVMdev] RFC: Constant Hoisting
...-63 return TCC_Free; This works. Its only downside is when these values are being used twice AND then not being combined into another instruction. I'd also recommend looking at not hoisting other values. However I haven't really looked this over very thoroughly. // Don't hoist imm8 if (Imm.isSignedIntN(8)) return TCC_Free; -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150202/56d432d0/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed.....
2011 Nov 16
0
[LLVMdev] LLVM 3.0 release notes ARM Target
what do you mean by "more optimal instructions" ? -omer On Wed, Nov 16, 2011 at 1:28 AM, Joe Abbey <jabbey at arxan.com> wrote: > I've done a first pass over the past 6 months of changes and some notable > things stood out: > > * The ARM backend has reworked Set Jump Long Jump EH Lowering. > * The ARM backend includes improved support for Cortex-M > *
2015 Mar 18
2
[LLVMdev] string input for the integrated assembler
On Tue, Mar 17, 2015 at 6:14 PM, Tim Northover <t.p.northover at gmail.com> wrote: >> As a simplification, the compiler deals almost exclusively in pseudo >> instructions. By x86 analogy, using pseudos to unfold a TEST32rm into >> MOV32rm + TEST32rr means I can skip the complex operand fitting effort >> needed to pick specific machine instructions. There are many
2012 May 10
0
[LLVMdev] MC Hammer Test results
...IA r0, {d0} when it should decode to FSTMIAX r0, {d0} These instructions are a bit of a curiosity in that they are pre-ARMv6 (VFPv1) instruction mnemonics which were not superseded by UAL-style V* mnemonics. They still exist in VFPv4 but their use is deprecated. Any VSTM's with odd numbered imm8 fields (bottom 8 bits) are the old-style F* encodings, and the encoding i for the immediate is different. -------------- next part -------------- A non-text attachment was scrubbed... Name: ca8_ARM_enc_dec_alcond_diffsonly_raw.rpt.bz2 Type: application/octet-stream Size: 1272798 bytes Desc: not av...