similar to: [LLVMdev] About instrumenting/rewriting X86 instructions

Displaying 20 results from an estimated 70000 matches similar to: "[LLVMdev] About instrumenting/rewriting X86 instructions"

2012 Dec 25
2
[LLVMdev] About instrumenting/rewriting X86 instructions
Hi all, I plan to use LLVM to instrument/rewrite X86 instructions during the compilation of a program. For example, insert checking target instructions before jmp instructions, or rewrite a instruction to prevent code using a specific register. I think the work should be done at the CodeGen phase, but I'm not quite clear how can I start. Can anyone give me some suggestion? Thanks very
2012 Dec 25
0
[LLVMdev] About instrumenting/rewriting X86 instructions
Hi all, I plan to use LLVM to instrument/rewrite X86 instructions during the compilation of a program. For example, insert checking target instructions before jmp instructions, or rewrite a instruction to prevent code using a specific register. I think the work should be done at the CodeGen phase, but I'm not quite clear how can I start. Can anyone give me some suggestion? Thanks very much,
2016 Jun 22
0
x86: How to Force 2-byte `jmp` instruction in lowering
Peter suggested just writing out '.byte 0xeb, 0x09' and that allowed the jump instruction to bypass the relaxation, so that fixes my immediate problem. The question still stands though whether it should be possible to do through the instruction builder interface. Cheers On Wed, Jun 22, 2016 at 10:40 AM Dean Michael Berris <dberris at google.com> wrote: > Thanks Nirav, > >
2009 Mar 21
0
[PATCH 1/1] SYSLINUX/COMBOOT: Abstract searchdir and fix the opendir call
From: Gene Cumm <gene.cumm at gmail.com> SYSLINUX/COMBOOT: Abstract searchdir and fix the opendir call Signed-off-by: Gene Cumm <gene.cumm at gmail.com> --- First, change comboot.inc such that INT 22h AX=0020h (opendir) is about as simple and similar in behavior to INT 22h AX=0006h (openfile). Next, rename the function searchdir to searchdir4any, create a new function called
2016 Jun 22
2
x86: How to Force 2-byte `jmp` instruction in lowering
Thanks Nirav, I can confirm that this works when I do the compile with llc, but then when linking to an executable with clang (patched with http://reviews.llvm.org/D20352 and compiler-rt patched with http://reviews.llvm.org/D21612) on Linux, I'm getting something different. Here's a sample of the transcript, and what I'm seeing: --->8 clang invocation 8<--- [16-06-23 3:33:42]
2009 Feb 08
1
[PATCH 1/1] COMBOOT API: Add calls for directory functions; Implement for FAT; Try 2
From: Gene Cumm <gene.cumm at gmail.com> COMBOOT API: Add calls for directory functions; Implement most only for FAT (SYSLINUX). Uses INT 22h AX= 001Fh, 0020h, 0021h and 0022h to prepare for the COM32 C functions getcwd(), opendir(), readdir(), and closedir(), respectively. INT22h, AX=001Fh will return a valid value for all variants. INT22h, AX= 0020h, 0021h, and 0022h are only
2019 Jul 24
2
Altering the return address , for a function with multiple return paths
On 7/23/19 8:42 PM, John McCall via llvm-dev wrote: > > On 21 Jul 2019, at 12:29, James Y Knight via llvm-dev wrote: > > Yes, indeed! > > The SBCL lisp compiler (not llvm based) used to emit functions > which would > return either via ret to the usual instruction after the call, or > else load > the return-address from the stack, then jump 2
2008 Dec 04
2
[PATCH 1/1] COMBOOT API: Add calls for directory functions; Implement for FAT
From: Gene Cumm <gene.cumm at gmail.com> COMBOOT API: Add calls for directory functions; Implement most only for FAT (SYSLINUX). Uses INT 22h AX= 001Eh, 001Fh, 0020h and 0021h to prepare for the COM32 C functions getcwd(), opendir(), readdir(), and closedir(), respectively. INT22h, AX=001Eh will return a valid value for all variants. INT22h, AX= 001Fh, 0020h, and 0021h are only
2006 Oct 11
1
during fitting of successive datasets, stall crashes iterations
Hi all, I am trying to do fitting of large sets of timeseries data, and error messages derail the process when I encounter a dataset that doesn't fit. I'd like to ignore those "misfits" and try another equation or move to the next dataset. Any ideas? (piece of code below) Thanks, --Warren ##The code looks something like this: attach(zf) x <- hours
2016 Jun 22
0
x86: How to Force 2-byte `jmp` instruction in lowering
Hmm. Odd. I just rebuilt from scratch and it seems to work with the test/CodeGen/X86/xray-attribute-instrumentation.ll test case outputing straight to obj: llc -filetype=obj -o ~/a.o -mtriple=x86_64-apple-macosx < test/CodeGen/X86/xray-attribute-instrumentation.ll What test case are you using? In any case, the issue appears to be that llvm doesn't realize that the target address is
2011 Nov 30
0
[PATCH 3/4] x86/emulator: properly handle lzcnt and tzcnt
These instructions are prefix selected flavors of bsf and bsr respectively, and hence the presences of the F3 prefix must be handled in the emulation code in order to avoid running into problems on newer CPUs. Signed-off-by: Jan Beulich <jbeulich@suse.com> --- a/xen/arch/x86/x86_emulate/x86_emulate.c +++ b/xen/arch/x86/x86_emulate/x86_emulate.c @@ -1058,6 +1058,9 @@ static bool_t vcpu_has(
2013 Aug 27
0
[LLVMdev] Issue with X86FrameLowering __chkstk on Windows 8 64-bit / Visual Studio 2012
It's not a solution to the actual bug (which is, as the thread you linked discusses, a problem with the assumption on LLVM's part that the __chkstk function lies within 2GB of the emitted code's address space) but there is a simple workaround: hoist all allocas to the first basic block of your function. This allows the JIT to perform all stack allocations in a single adjustment of the
2013 Aug 19
3
[LLVMdev] Issue with X86FrameLowering __chkstk on Windows 8 64-bit / Visual Studio 2012
Hi, I'm using LLVM to convert expressions to native assembly, the problem is when LLVM compiles this code: define void @fn_0000000000000000(i8*, i8*, i8*) { bb: %res = alloca i32 %3 = load i32* %res %4 = bitcast i8* %0 to i32* %5 = load i32* %4 %6 = bitcast i8* %0 to i32* %7 = load i32* %6 %8 = xor i32 %5, %7 store volatile i32 %8, i32* %res %9 = load i32* %res %10 = icmp
2009 Mar 22
1
[PATCH] [memdisk] Additional comments in memdisk.inc and postprocess.pl
>From 8fb8c285e69c0f4cde28061019a8e399641d5ef1 Mon Sep 17 00:00:00 2001 From: Shao Miller <shao.miller at yrdsb.edu.on.ca> Date: Sun, 22 Mar 2009 00:27:56 -0400 Subject: [PATCH] [memdisk] Additional comments in memdisk.inc and postprocess.pl Just a sprinkling of comments adding further description to the code. --- memdisk/memdisk.inc | 34 +++++++++++++++++++++-------------
2008 Feb 05
0
[LLVMdev] Counting instructions
On Tue, 5 Feb 2008, Raul Fernandes Herbster wrote: > I need to instrument the code in order to generate an event (call a certain > function) whenever X instructions have been executed. I'm using > MachineFunctionPass to get machine-dependent representation of each LLVM > function in the program. However, such pass doesn't allow to modify such > functions. Is there any other
2008 Feb 10
0
[LLVMdev] Instrumenting virtual function calls
On Feb 10, 2008, at 5:33 AM, Robert Zeh wrote: > I'm attempting to instrument virtual function calls in my code. > After each virtual call I'm calling my own registerMethod function, > with an integer marking the location of the call and a pointer to > the function that was called. > > However, and this is where I get confused, the function pointer >
2011 Nov 30
0
[PATCH 4/4] x86/emulator: cleanup
Utilize some of the additions in the prior patches to clean up other code: - keep track of REP prefixes in only one variable - use REX_W in a few more places (instead of a literal number) Signed-off-by: Jan Beulich <jbeulich@suse.com> --- a/xen/arch/x86/x86_emulate/x86_emulate.c +++ b/xen/arch/x86/x86_emulate/x86_emulate.c @@ -304,6 +304,10 @@ union vex { ptr[1] = rex |
2009 Mar 31
1
[PATCH 1/1] CORE/cache: add cache priority parameter
From: Gene Cumm <gene.cumm at gmail.com> CORE/cache: add cache priority parameter; Passing in DX=0 forces the cache entry to stay at the least recently used spot. Any other value allows it to continue on previous behavior of most recently used position in the list. Change ldlinux.asm and extlinux.asm (the only 2 users of cache) to pass in DX=1. Push/Pop DX unless it's definitely safe
2008 Feb 10
2
[LLVMdev] Instrumenting virtual function calls
I'm attempting to instrument virtual function calls in my code. After each virtual call I'm calling my own registerMethod function, with an integer marking the location of the call and a pointer to the function that was called. However, and this is where I get confused, the function pointer doesn't match any of the functions in my module. I'd hoped to call
2002 Feb 26
0
syslinux timeout
Hi. I've ever wondered how nuch timeis left to timeout while waiting at the boot prompt, so I've writen this small patch to show it. This add a configuration command 'showtimeout'. If you like the patch I could improve it (for example to show the timeout in decimal because now it uses the writehex functions) Regards. -- ______ ________ / / \/ /___ ) I N T E G