search for: fnstcw

Displaying 20 results from an estimated 25 matches for "fnstcw".

Did you mean: fnst
2006 Apr 29
2
[LLVMdev] Intel vs. AT&T Assembly.
....text .align 16 .align 16 .globl main .globl main .type main, @function main: main: subl $12, %esp sub esp, 12 fnstcw 10(%esp) fnstcw word ptr [esp + 10] movb $2, 11(%esp) mov byte ptr [esp + 11], 2 fldcw 10(%esp) fldcw word ptr [esp + 10] movl 20(%esp), %eax mov eax, dword ptr [esp + 20] movl 4(%eax), %eax mov...
2006 Apr 29
0
[LLVMdev] Intel vs. AT&T Assembly.
....align 16 .align 16 > .globl main .globl main > .type main, @function > main: main: > subl $12, %esp sub esp, 12 > fnstcw 10(%esp) fnstcw word ptr [esp + 10] > movb $2, 11(%esp) mov byte ptr [esp + 11], 2 > fldcw 10(%esp) fldcw word ptr [esp + 10] > movl 20(%esp), %eax mov eax, dword ptr [esp + 20] > movl 4(%eax)...
2006 Apr 29
4
[LLVMdev] Intel vs. AT&T Assembly.
...16 .align 16 >> .globl main .globl main >> .type main, @function >> main: main: >> subl $12, %esp sub esp, 12 >> fnstcw 10(%esp) fnstcw word ptr [esp + 10] >> movb $2, 11(%esp) mov byte ptr [esp + 11], 2 >> fldcw 10(%esp) fldcw word ptr [esp + 10] >> movl 20(%esp), %eax mov eax, dword ptr [esp + 20] >>...
2006 Apr 29
2
[LLVMdev] Intel vs. AT&T Assembly.
Hi, I notice `lli -print-machineinstrs -x86-asm-syntax=(att|intel)' both prefix registers with `%'. Is this right? I thought AT&T did this and Intel didn't. The GNU gas manual concurs. http://www.gnu.org/software/binutils/manual/gas-2.9.1/html_chapter/as_16.html Cheers, Ralph.
2006 Apr 29
0
[LLVMdev] Intel vs. AT&T Assembly.
The Intel version is just a clone of the AT&T version at this time. No one has yet taken the time to make it produce actual Intel syntax. Ralph Corderoy wrote: > Hi, > > I notice `lli -print-machineinstrs -x86-asm-syntax=(att|intel)' both > prefix registers with `%'. Is this right? I thought AT&T did this and > Intel didn't. The GNU gas manual concurs. >
2006 Jun 24
1
[LLVMdev] Help with error in pass
...een initialized before it is used in functions such as runOnMachineFunction::X86FloatingPoint.cpp or PPCRegisterInfo::emitPrologue. Now I have another question. My register allocator is generating code like this: .text .align 16 .globl main main: subl $2, %esp fnstcw (%esp) movb $2, 1(%esp) fldcw (%esp) xorl %eax, %eax movl %eax, %eax <---------------------- addl $2, %esp ret .size main, .-main Whereas RegAllocLocal.cpp is producing this one here: .text .align 16 .globl main main:...
2005 Mar 08
0
[LLVMdev] GCC assembler rejects native code generated by LLVM
...]* %.str_1, int 0, int 0) ); <int> [#uses=0] ret int 0 } declare void %__main() ------------- End LLVM code ----------- which in turn produces the following assembly code: ------------- Assembly code ------------- .text .align 16 .globl main .type main, @function main: subl $12, %esp fnstcw 10(%esp) movb $2, 11(%esp) fldcw 10(%esp) call __main movl $l1__2E_str_1, %eax movl %eax, (%esp) call printf movl $0, %eax #IMPLICIT_USE addl $12, %esp ret .data .align 1 .type l1__2E_str_1, at object .size l1__2E_str_1,13 l1__2E_str_1: # [13 x sbyte]* %.str_1 = c"hello wor...
2005 Mar 08
3
[LLVMdev] GCC assembler rejects native code generated by LLVM
...gt; declare void %__main() > ------------- End LLVM code ----------- > > which in turn produces the following assembly code: > > ------------- Assembly code ------------- > .text > .align 16 > .globl main > .type main, @function > main: > subl $12, %esp > fnstcw 10(%esp) > movb $2, 11(%esp) > fldcw 10(%esp) > call __main > movl $l1__2E_str_1, %eax > movl %eax, (%esp) > call printf > movl $0, %eax > #IMPLICIT_USE > addl $12, %esp > ret > > > .data > .align 1 > .type l1__2E_str_1, at object > .s...
2006 Nov 06
0
[LLVMdev] Convert C++ to C. What is 0x0p+0 ?
...your helloworld.c file as: #define CODE_FOR_MAIN() /* Any target-specific code for main()*/ #if defined(__GNUC__) && !defined(__llvm__) #if defined(i386) || defined(__i386__) || defined(__i386) || defined(__x86_64__) #undef CODE_FOR_MAIN #define CODE_FOR_MAIN() \ {short F;__asm__ ("fnstcw %0" : "=m" (*&F)); \ F=(F&~0x300)|0x200;__asm__("fldcw %0"::"m"(*&F));} #endif #endif As noted in the comment, this is for target-specific code needed at the start of main. It looks like your target needs a few assembly instructions there. As for t...
2006 May 01
0
[LLVMdev] Intel vs. AT&T Assembly.
....align 16 >>> .globl main .globl main >>> .type main, @function >>> main: main: >>> subl $12, %esp sub esp, 12 >>> fnstcw 10(%esp) fnstcw word ptr [esp + 10] >>> movb $2, 11(%esp) mov byte ptr [esp + 11], 2 >>> fldcw 10(%esp) fldcw word ptr [esp + 10] >>> movl 20(%esp), %eax mov eax, dword ptr [esp + 20] >&...
2005 Mar 08
3
[LLVMdev] GCC assembler rejects native code generated by LLVM
...gt; declare void %__main() > ------------- End LLVM code ----------- > > which in turn produces the following assembly code: > > ------------- Assembly code ------------- > .text > .align 16 > .globl main > .type main, @function > main: > subl $12, %esp > fnstcw 10(%esp) > movb $2, 11(%esp) > fldcw 10(%esp) > call __main > movl $l1__2E_str_1, %eax > movl %eax, (%esp) > call printf > movl $0, %eax > #IMPLICIT_USE > addl $12, %esp > ret > > > .data > .align 1 > .type l1__2E_str_1, at object > .s...
2005 Mar 08
0
[LLVMdev] GCC assembler rejects native code generated by LLVM
...> which in turn produces the following assembly code: > > > > ------------- Assembly code ------------- > > .text > > .align 16 > > .globl main > > .type main, @function > > main: > > subl $12, %esp > > fnstcw 10(%esp) > > movb $2, 11(%esp) > > fldcw 10(%esp) > > call __main > > movl $l1__2E_str_1, %eax > > movl %eax, (%esp) > > call printf > > movl $0, %eax > > #IMPLICIT_USE > > addl $12, %esp &gt...
2006 Nov 06
2
[LLVMdev] Convert C++ to C. What is 0x0p+0 ?
Hi: I've been able to compile the attached "helloworld.c" file converted from "helloworld.cpp". My question is how does one usually use __main() and CODE_FOR_MAIN() in tying up with the rest of the code? Attached here are the original "helloworld.cpp" and "helloworld.c" files. Thanks. Napi On Sun, 2006-11-05 at 09:14 -0800, Reid Spencer wrote: >
2006 Jun 26
2
[LLVMdev] Mapping bytecode to X86
...ake it produce correct code. Consider this program here: int main(int argc, char ** argv) { int i, j, sum; i = argv[0][0]; j = argv[0][1]; sum = (i + j) * j; printf("Sum = %d\n", sum); } that maps to this llvm bytecode: entry (0xa785590, LLVM BB @0xa77ebf8): FNSTCW16m <fi#0>, 1, %NOREG, 0 MOV8mi <fi#0>, 1, %NOREG, 1, 2 FLDCW16m <fi#0>, 1, %NOREG, 0 %reg1024 = MOV32rm <fi#-2>, 1, %NOREG, 0 %reg1025 = MOV32rm %reg1024, 1, %NOREG, 0 %reg1026 = MOVSX32rm8 %reg1025, 1, %NOREG, 0 %reg1027 = MOV...
2005 Mar 07
7
[LLVMdev] GCC assembler rejects native code generated by LLVM
I successfully compiled CVS HEAD yesterday on my win32 machine using Visual C++ Express (2005). I also have Mingw tools installed. I wrote a simple hello world application and generated native assembly code using llvm. When I tried to feed the code into GCC, it rejected it with "junk at the end of line" error messages. Shouldn't GCC be able to assemble this code? I realize win32 port
2005 Mar 08
2
[LLVMdev] GCC assembler rejects native code generated by LLVM
...embly code: > > > > > > ------------- Assembly code ------------- > > > .text > > > .align 16 > > > .globl main > > > .type main, @function > > > main: > > > subl $12, %esp > > > fnstcw 10(%esp) > > > movb $2, 11(%esp) > > > fldcw 10(%esp) > > > call __main > > > movl $l1__2E_str_1, %eax > > > movl %eax, (%esp) > > > call printf > > > movl $0, %eax > > > #IMPLICI...
2006 Jun 24
0
[LLVMdev] Help with error in pass
...ng in, for example? -Chris > .c ----------------------| .bc --------------------------------- > | Live Outs: EAX > | > #include <stdio.h> | entry (0x8d4c6c0, LLVM BB @0x8d46970): > | FNSTCW16m <fi#0>, 1, %NOREG, 0 > int main() { | MOV8mi <fi#0>, 1, %NOREG, 1, 2 > return 0; | FLDCW16m <fi#0>, 1, %NOREG, 0 > } | %reg1024 = MOV32r0 > | %EAX = MOV32rr %reg1024 >...
2006 Jun 23
2
[LLVMdev] Help with error in pass
...m below, the following error message is produced: .c ----------------------| .bc --------------------------------- | Live Outs: EAX | #include <stdio.h> | entry (0x8d4c6c0, LLVM BB @0x8d46970): | FNSTCW16m <fi#0>, 1, %NOREG, 0 int main() { | MOV8mi <fi#0>, 1, %NOREG, 1, 2 return 0; | FLDCW16m <fi#0>, 1, %NOREG, 0 } | %reg1024 = MOV32r0 | %EAX = MOV32rr %reg1024 |...
2005 Mar 08
0
[LLVMdev] GCC assembler rejects native code generated by LLVM
...t;>> >>>> ------------- Assembly code ------------- >>>> .text >>>> .align 16 >>>> .globl main >>>> .type main, @function >>>> main: >>>> subl $12, %esp >>>> fnstcw 10(%esp) >>>> movb $2, 11(%esp) >>>> fldcw 10(%esp) >>>> call __main >>>> movl $l1__2E_str_1, %eax >>>> movl %eax, (%esp) >>>> call printf >>>> movl $0, %eax >>>&gt...
2005 Mar 08
0
[LLVMdev] GCC assembler rejects native code generated by LLVM
...code ----------- > > > > which in turn produces the following assembly code: > > > > ------------- Assembly code ------------- > > .text > > .align 16 > > .globl main > > .type main, @function > > main: > > subl $12, %esp > > fnstcw 10(%esp) > > movb $2, 11(%esp) > > fldcw 10(%esp) > > call __main > > movl $l1__2E_str_1, %eax > > movl %eax, (%esp) > > call printf > > movl $0, %eax > > #IMPLICIT_USE > > addl $12, %esp > > ret > > > > > >...