Displaying 20 results from an estimated 29 matches for "fldcw".
2006 Apr 29
2
[LLVMdev] Intel vs. AT&T Assembly.
....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 eax, dword ptr [eax + 4]
Just some little bits to go.
Cheers,
Ralph.
2006 Apr 29
0
[LLVMdev] Intel vs. AT&T Assembly.
....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 eax, dword ptr [eax + 4]
Whoops. I've provided my post-processed version of lli's Intel output
which, since I remo...
2006 Apr 29
4
[LLVMdev] Intel vs. AT&T Assembly.
...ain, @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 eax, dword ptr [eax + 4]
>>
>
> Whoops. I've provided my post-processed version of lli's I...
2001 Oct 17
1
res0.c / by 0?
...hen
running vorbisfile_example. Is this some debugging code?
Note that you don't see the exception unless you insert
__asm{
push edx
sub esp, 4
fstcw [esp]
mov dx, [esp]
and dx, 0xFFFE
mov [esp], dx
fldcw [esp]
add esp, 4
pop edx
}
in vorbisfile_example.c directly after line 82. (Win2000sp2/msvc6sp5pp)
You also get this when calling ov_clear() from code where the exceptions
are unmasked (i.e, when using another compiler than msvc). That's how I got
there.
Per...
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
...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:
subl $2, %esp
fnstcw (%esp)...
2005 Mar 08
0
[LLVMdev] GCC assembler rejects native code generated by LLVM
...> [#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 world\0A\00"
.ascii "hello...
2005 Mar 08
3
[LLVMdev] GCC assembler rejects native code generated by LLVM
...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: # [...
2006 Nov 06
0
[LLVMdev] Convert C++ to C. What is 0x0p+0 ?
...ain()*/
#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 the __main function, its a gcc library call required by the
compiler for program start...
2006 May 01
0
[LLVMdev] Intel vs. AT&T Assembly.
...gt;> 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 eax, dword ptr [eax + 4]
>>>
>>
>> Whoops. I've provided my post-processed versi...
2002 Sep 23
2
Libvorbis suggestion & floating point exception
Hello,
I'm not quite sure if this is the right list for my questions, please excuse
if it isn't.
1. While using vorbislib (Win2K/Borland C++ Builder 5), I'm getting
reproducible floating point exceptions at lots of sample rate/bit rate
combinations. For example, the original encoder_example.c, with just the
initialization line changed to
2005 Mar 08
3
[LLVMdev] GCC assembler rejects native code generated by LLVM
...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: # [...
2005 Mar 08
0
[LLVMdev] GCC assembler rejects native code generated by LLVM
...> > ------------- 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
> &...
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
...{
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 = MOVSX32rm8 %reg1025, 1, %NOREG, 1
ADJCALLSTACKDOWN 8
%reg1028 = ADD32rr %reg...
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
...-------
> > > .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
> >...
2006 Jun 24
0
[LLVMdev] Help with error in pass
...ts: 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
> | RET
>
> llc((anonymous namespace)::PrintStackTrace()+0x18)[0x88cfa30]
> llc((anonymous namespace)::SignalHandle...
2002 Nov 18
1
i386 floating point tweaking
Just been trying to get the polygon triangulation code from this
package: http://www-2.cs.cmu.edu/~quake/triangle.html to dyn.load into
R. Uh oh. Floating point exceptions.
Track it down to some FPU diddling that the author deems is necessary.
Here's my minimal code that breaks:
flipme.c:
#include <fpu_control.h>
void flipme(){
int cword;
cword=4210;
_FPU_SETCW(cword);