Sky Flyer via llvm-dev
2015-Nov-05 14:20 UTC
[llvm-dev] constant string as an assembly operand
Hello all, how can one can describe a constant string as an operand in the assembly instruction? for example imagine this instruction: xyz 14 ABC where "xyz" is the operator, 14 is an immediate value, and because of assembly dialect, there should be a constant string with the value of ABC follow the immediate value. How is this possible? What should be the dat describing the instruction? string asm = "xyz $val ABC" dag iops = (ins i8imm:val, ... ) Cheers, ES -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151105/3943fea5/attachment.html>
Tom Stellard via llvm-dev
2015-Nov-05 15:33 UTC
[llvm-dev] constant string as an assembly operand
On Thu, Nov 05, 2015 at 03:20:45PM +0100, Sky Flyer via llvm-dev wrote:> Hello all, > > how can one can describe a constant string as an operand in the assembly > instruction? > > for example imagine this instruction: > > xyz 14 ABC > > where "xyz" is the operator, 14 is an immediate value, and because of > assembly dialect, there should be a constant string with the value of ABC > follow the immediate value. How is this possible? > > What should be the dat describing the instruction? > > string asm = "xyz $val ABC"Can this be an arbitrary string or will it always be ABC? If it's the later, then what you've posted above should work for the asm string. -Tom> dag iops = (ins i8imm:val, ... ) > > > Cheers, > ES> _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Sky Flyer via llvm-dev
2015-Nov-05 15:43 UTC
[llvm-dev] constant string as an assembly operand
Hi Tom, Thanks. It should be always ABC. What should be the iops? just (ins i8imm:$val)? what would be the placeholder for a constant string in "ins"? On Thu, Nov 5, 2015 at 4:33 PM, Tom Stellard <tom at stellard.net> wrote:> On Thu, Nov 05, 2015 at 03:20:45PM +0100, Sky Flyer via llvm-dev wrote: > > Hello all, > > > > how can one can describe a constant string as an operand in the assembly > > instruction? > > > > for example imagine this instruction: > > > > xyz 14 ABC > > > > where "xyz" is the operator, 14 is an immediate value, and because of > > assembly dialect, there should be a constant string with the value of ABC > > follow the immediate value. How is this possible? > > > > What should be the dat describing the instruction? > > > > string asm = "xyz $val ABC" > > Can this be an arbitrary string or will it always be ABC? If it's the > later, > then what you've posted above should work for the asm string. > > -Tom > > > dag iops = (ins i8imm:val, ... ) > > > > > > Cheers, > > ES > > > _______________________________________________ > > LLVM Developers mailing list > > llvm-dev at lists.llvm.org > > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151105/98f3f0cb/attachment.html>