Displaying 20 results from an estimated 2000 matches similar to: "[LLVMdev] Stack trace - clang"
2018 Mar 22
2
ARM Backend BuildMI operand issues
Hello everyone,
I'm working on a MachineFunctionPass that inserts a list of instructions
into an Module so a later Pass can work on them.
To do so I load a dummy .ll file created from a main stub, create the
needed function stubs (ModulePass), insert Blocks and create
instructions using BuildMI.
I started with branch instructions:
const TargetMachine &TM = MF.getTarget();
2018 Mar 22
0
ARM Backend BuildMI operand issues
On 03/22/2018 09:29 AM, Julius Hiller via llvm-dev wrote:
> Hello everyone,
>
> I'm working on a MachineFunctionPass that inserts a list of instructions into an Module so a later Pass can work on them.
> To do so I load a dummy .ll file created from a main stub, create the needed function stubs (ModulePass), insert Blocks and create instructions using BuildMI.
> I started with
2018 Mar 23
1
ARM Backend BuildMI operand issues
Thank you for your help Tom
you are totally right with the registers but the command you suggest
also doesn't work.
After some research I found the following thread on the mailing list:
http://lists.llvm.org/pipermail/llvm-dev/2017-February/110086.html
With your help and the information about the condition codes I was able
to resolve the error:
BuildMI(BB, BB.end(), DL,
2018 Jun 26
2
MachineFunction Instructions Pass using Segment Registers
This shouldn't have parsed.
movq (%gs), %r14
That's trying to use%gs as a base register which isn't valid. GNU assembler
rejects it. And coincidentally llvm-mc started rejecting it on trunk late
last week. That's probably why it printed as %ebp.
I don't know if there is an instruction to read the base of %gs directly.
Maybe rdgsbase, but that's only available on Ivy
2018 Jun 30
2
Using BuildMI to insert Intel MPX instruction BNDCU failed
Hello everyone, I'm a newbie of llvm. I'm trying to insert Intel MPX
instruction BNDCU with BuildMI. I add my machinefunctionpass
at addPreEmitPass2.
Here is the code of insertion:
BuildMI(MBB, MI, DL, TII->get(X86::BNDCU64rr)).addReg(X86::BND2,
RegState::Define).addReg(X86::R10);
And here is to stack track when I compiler program with modified llc:
2018 Jun 24
2
MachineFunction Instructions Pass using Segment Registers
The size suffix thing is a weird quirk in our assembler I should look into
fixing. Instructions in at&t syntax usually have a size suffix that is
often optional
For example:
add %ax, %bx
and
addw %ax, %bx
Are equivalent because the register name indicates the size.
but for an instruction like this
addw $1, (%ax)
There is nothing to infer the size from so an explicit suffix is
2018 Sep 28
3
error: expected memory with 32-bit signed offset
Hi,
I want to encode Loongson ISA initially
https://gist.github.com/xiangzhai/8ae6966e2f02a94e180dd16ff1cd60ac
gslbx $2,0($3,$4)
It is equivalent to:
dadd $1, $3, $4
lb $2,0($1)
I just use mem_simmptr as the default value of DAGOperand MO ,
because MipsMemAsmOperand use parseMemOperand to parse general
MemOffset and only *one* AnyRegister , for example:
0($1)
But
2012 Mar 02
0
[LLVMdev] how to annotate assembler
On 02.03.2012, at 09:20, Konstantin Vladimirov wrote:
> Hi,
>
> In GCC there is one useful option -dp (or -dP for more verbose output)
> to annotate assembler with instruction patterns, that was used when
> assembler was generated. For example:
The internal "-mllvm -show-mc-inst" option is probably as close as you can get.
$ clang -S -O0 test.c -mllvm -show-mc-inst -o
2012 Sep 26
0
[LLVMdev] What does MCOperand model?
Owen is correct in his descriptions. The MCOperand values are intended to model the instruction encoding. Where that doesn't match the assembly syntax, the asm parser (and codegen) and the instruction printer are responsible for encoding/decoding the values.
For targets that predate the MC layer, this isn't always the case, leading to things being a bit confusing when just reading the
2012 Sep 26
2
[LLVMdev] What does MCOperand model?
A question for LLVM code generator developers:
After having read through "The LLVM Target-Independent Code Generator"
[1] I'm unclear about what precisely the objects MCInst and MCOperand
represent. They sit in the space between assembly syntax and binary
encodings, but which are they modeling? For example, a Thumb 2 branch
instruction 'b' takes an immediate. That syntax
2012 Dec 23
5
[LLVMdev] Getting MCInst "ins" and "outs"
Hi all.
I'm looking for some way to do code analysis with LLVM. Can someone please give me a hint, if it is possible to query an MCInst for what are input operands and what are output operands?
Small example.
Consider we have an instruction:
str r1, [sp, #8]
Being mapped into MCInst instance it has the following operands:
<MCOperand Reg:61> <-- maps to reg r1
2019 Mar 25
2
Printing PC-relative offsets - how to get the instruction length?
Hi
In my MC6809 backend, in llvm/lib/Target/MC6809/InstPrinter/MC6809InstPrinter.cpp, I have the routine
void MC6809InstPrinter::printPCRelImmOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O) {
const MCOperand &Op = MI->getOperand(OpNo);
ZZ
if (Op.isImm()) {
int64_t Imm = Op.getImm() + 2; <<<========================
O << "$";
if (Imm
2016 Sep 14
4
setDataLayout segfault
I get a segfault with this code when setting the data layout:
int main(int argc, char** argv)
{
llvm::InitializeNativeTarget();
llvm::LLVMContext TheContext;
unique_ptr<Module> Mod(new Module("A",TheContext));
llvm::EngineBuilder engineBuilder(std::move(Mod));
std::string mcjit_error;
engineBuilder.setMCPU(llvm::sys::getHostCPUName());
2018 Nov 09
5
Should NaN payloads be preserved through compilation?
Hi everyone,
The WebAssembly backend recently had Bug 39448
<https://bugs.llvm.org/show_bug.cgi?id=39448> filed against it because NaN
payloads in floating-point immediates are not preserved through compilation
on 32-bit builds. I took a look and the corruption takes place when the
immediates are converted from APFloats to be stored as native doubles in
MCOperand. I assume this bug only
2010 Jun 22
1
GPXE arch/i386/scripts/i386.lds:1: undefined symbol `_max_align' referenced in expression
syslinux 3.86 and 4.00-pre55
make[2]: Entering directory
`/home/gzp/src/syslinux-4.00-pre55/gpxe/src'
[AR] bin/blib.a
ar: creating bin/blib.a
[HOSTCC] util/zbin
[LD] bin/undionly.kkpxe.tmp
arch/i386/scripts/i386.lds:1: undefined symbol `_max_align' referenced in expression
make[2]: *** [bin/undionly.kkpxe.tmp] Error 1
make[2]: Leaving directory
2012 Sep 11
3
[LLVMdev] Need Help Understanding Operands in X86 MachineFunctionPass
Dear All,
I'm working on an X86 MachineFunctionPass that adds prefetch
instructions to a function. I have code that adds a "prefetchnta
<constant address>" instruction to x86 32-bit code. What I want to do
is to add a "prefetchnta <constant address>" instruction to x86_64 code.
The code for adding the 32-bit instruction is:
2006 Jun 07
1
Apache php and exim
Hello,
I'm using the targeted policy.
PHP's mail() function fails because of selinux.
audit(1149662369.454:2): avc: denied { setgid } for pid=18085
comm="sendmail" capability=6 scontext=root:system_r:httpd_sys_script_t
tcontext=root:system_r:httpd_sys_script_t tclass=capability
When i turn to permisive mode:
audit(1149668677.105:12): avc: denied { setuid } for pid=29159
2013 Jun 25
0
[LLVMdev] Auxiliary operand types for disassembler.
Hi Sid,
This feels like it’s exposing too much of the disassembler internals into the MCOperand representation. I’m not sure I follow why that’s necessary. Can you elaborate a bit?
-Jim
On Jun 25, 2013, at 8:24 AM, Sid Manning <sidneym at codeaurora.org> wrote:
>
> I'm working on a disassembler for hexagon (vliw) architecture and I would like to add an additional operand type,
2013 Jun 26
1
[LLVMdev] Auxiliary operand types for disassembler.
On 06/25/2013 04:46 PM, Jim Grosbach wrote:
> Hi Sid,
>
> This feels like it’s exposing too much of the disassembler internals
> into the MCOperand representation. I’m not sure I follow why that’s
> necessary. Can you elaborate a bit?
>
A packet contains 1-4 insns and until the contents of the entire packet
are known the meaning of any individual insn is not known with 100%
2018 Nov 26
4
[RFC] Checking inline assembly for validity
GCC-style inline assembly is notoriously hard to write correctly, because it is
the user's responsibility to tell the compiler about the requirements of the
assembly (inputs, output, modified registers, memory access), and getting this
wrong results in silently generating incorrect code. This is also dependent on
register allocation and scheduling decisions made by the compiler, so an inline