> -----Original Message----- > From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu]On> Behalf Of Bill Wendling > Sent: Friday, September 19, 2008 4:38 AM > > On Thu, Sep 18, 2008 at 7:12 AM, <Sachin.Punyani at microchip.com>wrote:> > What changes would be required in LLVM to support illegal pointertype?> > > Hi Sachin, > > The question's a bit broad. And I don't think the answer you want is > as simple as "don't run the legalizer" (which probably won't work). Do > you have a more specific question?I am trying to ask a broad question. My target has 16 bit pointers but register size is 8 bit only. What changes in LLVM would be required to support 16 bit pointers on 8 bit registers? Regards Sachin> _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> I am trying to ask a broad question. My target has 16 bit pointers but > register size is 8 bit only. What changes in LLVM would be required to > support 16 bit pointers on 8 bit registers?The target will need to to multi-byte arithmetic on non-pointer types as well. The size of the accumulator shouldn't need to be tied directly to the size of an integer or the size of a pointer in the back end. Are you asking about how to write a back-end for an 8-bit target in general? About whether changes would be required in the LLVM IR specification to support one? Something else entirely?
I am assuming a 16-bit value will be stored in a pair of 8-bit registers? If so, add pseudo register which represent pairs of 8-bit registers. Add them to a pseudo register class. This allows you to mark i16 "legal". The difficult part is then to figure out how to lower these 16-bit operations into 8-bit ones. You probably need to custom lower a bunch of them with target specific code. Evan On Sep 19, 2008, at 5:01 AM, Sachin.Punyani at microchip.com wrote:> > >> -----Original Message----- >> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev- >> bounces at cs.uiuc.edu] > On >> Behalf Of Bill Wendling >> Sent: Friday, September 19, 2008 4:38 AM >> >> On Thu, Sep 18, 2008 at 7:12 AM, <Sachin.Punyani at microchip.com> > wrote: >>> What changes would be required in LLVM to support illegal pointer > type? >>> >> Hi Sachin, >> >> The question's a bit broad. And I don't think the answer you want is >> as simple as "don't run the legalizer" (which probably won't work). >> Do >> you have a more specific question? > > I am trying to ask a broad question. My target has 16 bit pointers but > register size is 8 bit only. What changes in LLVM would be required to > support 16 bit pointers on 8 bit registers? > > Regards > Sachin > >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>I am assuming a 16-bit value will be stored in a pair of 8-bit > registers?One related question is how to make sure that the correct register pair is allocated to the16-bit quantity when using two 8-bit operations. In other words, how we can make sure that the 16-bit pointer is stored into [AH, AL] and not in [AH, BL] ? i.e. GR8 = [ AH, BH, AL, BL]; GR16 = [AX, BX] ; // AX, BX are subreg pairs of ah,al and bh, bl the DAG looks like Wrapper:i16 (GR16) = MoveToHi:i8 (GR8) , MoveToLo:i8 (GR8) Now how to make sure that if MoveToHi gets AH , then 1. MoveToLo should get AL, 2. the Wrapper should get AX - Sanjiv On Sep 19, 2008, at 5:01 AM, Sachin.Punyani at microchip.com wrote:> > >> -----Original Message----- >> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev- >> bounces at cs.uiuc.edu] > On >> Behalf Of Bill Wendling >> Sent: Friday, September 19, 2008 4:38 AM >> >> On Thu, Sep 18, 2008 at 7:12 AM, <Sachin.Punyani at microchip.com> > wrote: >>> What changes would be required in LLVM to support illegal pointer > type? >>> >> Hi Sachin, >> >> The question's a bit broad. And I don't think the answer you want is >> as simple as "don't run the legalizer" (which probably won't work). >> Do >> you have a more specific question? > > I am trying to ask a broad question. My target has 16 bit pointers but > register size is 8 bit only. What changes in LLVM would be required to > support 16 bit pointers on 8 bit registers? > > Regards > Sachin > >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev_______________________________________________ LLVM Developers mailing list LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 6091 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080920/863380b2/attachment.bin>