Re: [E-devel] Evas MMX/SSE bug?

2006-01-30 Thread The Rasterman
On Mon, 30 Jan 2006 02:00:19 -0500 Michael Jennings <[EMAIL PROTECTED]> babbled:

> I'm getting a SIGILL from evas on one of my systems which has MMX
> support but no SSE support.  I think it might be a bug in evas'
> choosing of optimized routines.  Here's the trace:
> 
> #8  0xb7e678a5 in evas_common_copy_pixels_rgba_to_rgba_sse ()
> #from /usr/lib/libevas.so.1 9  0xb7e7c988 in
> #evas_common_scale_rgba_in_to_out_clip_smooth_mmx ()
> #from /usr/lib/libevas.so.1 10 0xb7e856b4 in
> #evas_common_scale_rgba_in_to_out_clip_smooth () from /usr/lib/libevas.so.1
> #11 0xb7984c97 in evas_engine_software_x11_image_draw ()
>from /usr/lib/evas/modules/engines/software_x11/linux-gnu-i686/module.so
> #12 0xb7e4de93 in evas_object_image_render () from /usr/lib/libevas.so.1
> #13 0xb7e63198 in evas_render_updates_internal () from /usr/lib/libevas.so.1
> #14 0xb7f63f9e in _ecore_evas_x_render () from /usr/lib/libecore_evas.so.1
> #15 0xb7f671b4 in _ecore_evas_x_show () from /usr/lib/libecore_evas.so.1
> #16 0xb7f62303 in ecore_evas_show () from /usr/lib/libecore_evas.so.1
> #17 0x0806ceaf in e_container_show ()
> #18 0x080613a8 in main ()
> 
> Notice that the MMX routine is calling an SSE routine; that's not
> valid on a P2 with only MMX.
> 
> Any thoughts?  Raster?

what does you src/lib/engines/common/evas_cpu.c say in evas_common_cpu_sse_test
(). literally the mmx in that uses movq (see the macro in evas_mmx.h) and
monvtq - movntq is a newer call in sse and thats what the sse test routines
should be looking for - stargint at the code in front of me right now - thats
what it does.

> Michael
> 
> -- 
> Michael Jennings (a.k.a. KainX)  http://www.kainx.org/  <[EMAIL PROTECTED]>
> n + 1, Inc., http://www.nplus1.net/   Author, Eterm (www.eterm.org)
> ---
>  "Take me in to the Holy of Holies.  Take me in by the blood of the
>   Lamb.  Take me in to the Holy of Holies.  Take the coal; cleanse
>   my lips; here I am."-- Petra
> 
> 
> ---
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> 


-- 
- Codito, ergo sum - "I code, therefore I am" --
The Rasterman (Carsten Haitzler)[EMAIL PROTECTED]
裸好多
Tokyo, Japan (東京 日本)


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Evas MMX/SSE bug?

2006-01-30 Thread Michael Jennings
On Monday, 30 January 2006, at 17:45:15 (+0900),
Carsten Haitzler wrote:

> what does you src/lib/engines/common/evas_cpu.c say in
> evas_common_cpu_sse_test ().

You want me to set a breakpoint there or something?  Watching the
strace, I do get an illegal instruction early on in the execution, but
the SIGILL is caught.  I'm guessing that's the SSE test.

> literally the mmx in that uses movq (see the macro in evas_mmx.h)
> and monvtq - movntq is a newer call in sse and thats what the sse
> test routines should be looking for - stargint at the code in front
> of me right now - thats what it does.

If I were to hazard a guess, I'd say an SSE routine is being called
inside BUILD_MMX by accident.  Could that be?

Michael

-- 
Michael Jennings (a.k.a. KainX)  http://www.kainx.org/  <[EMAIL PROTECTED]>
n + 1, Inc., http://www.nplus1.net/   Author, Eterm (www.eterm.org)
---
 "I believe God's grace is so incredible that He saves those who so
  much as grunt in His general direction, as long as it is from their
  heart."-- Rick Durrance, Youth Pastor, Wilmore UMC (paraphrased)


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Evas MMX/SSE bug?

2006-01-30 Thread The Rasterman
On Mon, 30 Jan 2006 12:36:17 -0500 Michael Jennings <[EMAIL PROTECTED]> babbled:

> On Monday, 30 January 2006, at 17:45:15 (+0900),
> Carsten Haitzler wrote:
> 
> > what does you src/lib/engines/common/evas_cpu.c say in
> > evas_common_cpu_sse_test ().
> 
> You want me to set a breakpoint there or something?  Watching the
> strace, I do get an illegal instruction early on in the execution, but
> the SIGILL is caught.  I'm guessing that's the SSE test.
> 
> > literally the mmx in that uses movq (see the macro in evas_mmx.h)
> > and monvtq - movntq is a newer call in sse and thats what the sse
> > test routines should be looking for - stargint at the code in front
> > of me right now - thats what it does.
> 
> If I were to hazard a guess, I'd say an SSE routine is being called
> inside BUILD_MMX by accident.  Could that be?

that shouldnt matter as there needs to be a runtime test to choose as
originally u ONLY built the routiens - later i made it runtime chosen so sse
and mmx are always built on x86, but chosen runtime. somehow the sse check is
either just being ignored (weird) or the check is wrong (i just want to check
your souce is the same as i have here). ie - does the sse test function use
movntq to test as the only sse instruction in
evas_common_copy_pixels_rgba_to_rgba_sse() is the MOVE_16DWORDS_MMX2 macro
(movq is old fashioned basic mmx and only these 2 instrucitons are used in that
macro). so check your evas_cpu.c sse test is the same as mine here - ie it
should be testing:

   movntq_r2m(mm0, blah);

it could be the cpu_can_do though... i've made a small change as technically
mmx2 and sse come together. :)

> Michael
> 
> -- 
> Michael Jennings (a.k.a. KainX)  http://www.kainx.org/  <[EMAIL PROTECTED]>
> n + 1, Inc., http://www.nplus1.net/   Author, Eterm (www.eterm.org)
> ---
>  "I believe God's grace is so incredible that He saves those who so
>   much as grunt in His general direction, as long as it is from their
>   heart."-- Rick Durrance, Youth Pastor, Wilmore UMC (paraphrased)
> 
> 
> ---
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> 


-- 
- Codito, ergo sum - "I code, therefore I am" --
The Rasterman (Carsten Haitzler)[EMAIL PROTECTED]
裸好多
Tokyo, Japan (東京 日本)


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Evas MMX/SSE bug?

2006-01-30 Thread Michael Jennings
On Tuesday, 31 January 2006, at 10:29:48 (+0900),
Carsten Haitzler wrote:

> > > literally the mmx in that uses movq (see the macro in evas_mmx.h)
> > > and monvtq - movntq is a newer call in sse and thats what the sse
> > > test routines should be looking for - stargint at the code in front
> > > of me right now - thats what it does.
> > 
> > If I were to hazard a guess, I'd say an SSE routine is being called
> > inside BUILD_MMX by accident.  Could that be?
> 
> that shouldnt matter as there needs to be a runtime test to choose as
> originally u ONLY built the routiens - later i made it runtime chosen so sse
> and mmx are always built on x86, but chosen runtime. somehow the sse check is
> either just being ignored (weird) or the check is wrong (i just want to check
> your souce is the same as i have here). ie - does the sse test function use
> movntq to test as the only sse instruction in
> evas_common_copy_pixels_rgba_to_rgba_sse() is the MOVE_16DWORDS_MMX2 macro
> (movq is old fashioned basic mmx and only these 2 instrucitons are used in 
> that
> macro). so check your evas_cpu.c sse test is the same as mine here - ie it
> should be testing:
> 
>movntq_r2m(mm0, blah);
> 
> it could be the cpu_can_do though... i've made a small change as technically
> mmx2 and sse come together. :)

Line 52 of src/lib/engines/common/evas_cpu.c has:

void
evas_common_cpu_sse_test(void)
{
#ifdef BUILD_SSE
   int blah[2500];

   prefetch(blah + 1200);
#endif
}

prefetch is defined in src/lib/include/evas_mmx.h as:

#define prefetch(var) \
__asm__ __volatile__ ( \
 "prefetchnta (%0) \n" \
 : \
 : "r" (var) \
 );

I only see movntq_r2m being used in
src/lib/engines/common/evas_convert_yuv.c

Michael

-- 
Michael Jennings (a.k.a. KainX)  http://www.kainx.org/  <[EMAIL PROTECTED]>
n + 1, Inc., http://www.nplus1.net/   Author, Eterm (www.eterm.org)
---
 "Whoa.  Somebody computer programmers think is anti-social?  That
  I'd like to see."-- Sydney Penny, "Hyperion Bay"


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Evas MMX/SSE bug?

2006-01-30 Thread The Rasterman
On Mon, 30 Jan 2006 22:51:48 -0500 Michael Jennings <[EMAIL PROTECTED]> babbled:

> On Tuesday, 31 January 2006, at 10:29:48 (+0900),
> Carsten Haitzler wrote:
> 
> > > > literally the mmx in that uses movq (see the macro in evas_mmx.h)
> > > > and monvtq - movntq is a newer call in sse and thats what the sse
> > > > test routines should be looking for - stargint at the code in front
> > > > of me right now - thats what it does.
> > > 
> > > If I were to hazard a guess, I'd say an SSE routine is being called
> > > inside BUILD_MMX by accident.  Could that be?
> > 
> > that shouldnt matter as there needs to be a runtime test to choose as
> > originally u ONLY built the routiens - later i made it runtime chosen so sse
> > and mmx are always built on x86, but chosen runtime. somehow the sse check
> > is either just being ignored (weird) or the check is wrong (i just want to
> > check your souce is the same as i have here). ie - does the sse test
> > function use movntq to test as the only sse instruction in
> > evas_common_copy_pixels_rgba_to_rgba_sse() is the MOVE_16DWORDS_MMX2 macro
> > (movq is old fashioned basic mmx and only these 2 instrucitons are used in
> > that macro). so check your evas_cpu.c sse test is the same as mine here -
> > ie it should be testing:
> > 
> >movntq_r2m(mm0, blah);
> > 
> > it could be the cpu_can_do though... i've made a small change as technically
> > mmx2 and sse come together. :)
> 
> Line 52 of src/lib/engines/common/evas_cpu.c has:
> 
> void
> evas_common_cpu_sse_test(void)
> {
> #ifdef BUILD_SSE
>int blah[2500];
> 
>prefetch(blah + 1200);
> #endif
> }

ok - your evas is not what is in cvs:

void
evas_common_cpu_sse_test(void)
{
#ifdef BUILD_SSE
   int blah[16];

   movntq_r2m(mm0, blah);
#endif
}

is what's in dev cvs for evas. up to date:
[  1:31PM ~/C/evas/src/lib/engines/common ] cvs commit
cvs commit: Examining .
[  1:31PM ~/C/evas/src/lib/engines/common ] 

ie - nothing left to commit. that'll be your problem atm :)

> prefetch is defined in src/lib/include/evas_mmx.h as:
> 
> #define prefetch(var) \
> __asm__ __volatile__ ( \
>  "prefetchnta (%0) \n" \
>  : \
>  : "r" (var) \
>  );
> 
> I only see movntq_r2m being used in
> src/lib/engines/common/evas_convert_yuv.c
> 
> Michael
> 
> -- 
> Michael Jennings (a.k.a. KainX)  http://www.kainx.org/  <[EMAIL PROTECTED]>
> n + 1, Inc., http://www.nplus1.net/   Author, Eterm (www.eterm.org)
> ---
>  "Whoa.  Somebody computer programmers think is anti-social?  That
>   I'd like to see."-- Sydney Penny, "Hyperion Bay"
> 
> 
> ---
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> 


-- 
- Codito, ergo sum - "I code, therefore I am" --
The Rasterman (Carsten Haitzler)[EMAIL PROTECTED]
裸好多
Tokyo, Japan (東京 日本)


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Evas MMX/SSE bug?

2006-01-30 Thread Michael Jennings
On Tuesday, 31 January 2006, at 13:31:51 (+0900),
Carsten Haitzler wrote:

> ok - your evas is not what is in cvs:
> 
> void
> evas_common_cpu_sse_test(void)
> {
> #ifdef BUILD_SSE
>int blah[16];
> 
>movntq_r2m(mm0, blah);
> #endif
> }

[EMAIL PROTECTED] ~/cvs/e17/libs/evas >> mzblame 
src/lib/engines/common/evas_cpu.c
...skip...
1.13 (raster   10-Sep-03): void
1.3  (rbdpngn  11-Mar-03): evas_common_cpu_sse_test(void)
1.3  (rbdpngn  11-Mar-03): {
1.25 (raster   22-May-05): #ifdef BUILD_SSE
1.27 (raster   31-Jan-06):int blah[16];
1.25 (raster   22-May-05): 
1.26 (raster   26-Jan-06):movntq_r2m(mm0, blah);
   ^

"I fixed that 4 days ago" would've been a perfectly acceptable
response. :-P

Michael

-- 
Michael Jennings (a.k.a. KainX)  http://www.kainx.org/  <[EMAIL PROTECTED]>
n + 1, Inc., http://www.nplus1.net/   Author, Eterm (www.eterm.org)
---
 "Nerds make the best lovers.  That's why I'm in Speed School." 
   -- Angela Smith


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Evas MMX/SSE bug?

2006-01-30 Thread The Rasterman
On Mon, 30 Jan 2006 23:35:44 -0500 Michael Jennings <[EMAIL PROTECTED]> babbled:

> On Tuesday, 31 January 2006, at 13:31:51 (+0900),
> Carsten Haitzler wrote:
> 
> > ok - your evas is not what is in cvs:
> > 
> > void
> > evas_common_cpu_sse_test(void)
> > {
> > #ifdef BUILD_SSE
> >int blah[16];
> > 
> >movntq_r2m(mm0, blah);
> > #endif
> > }
> 
> [EMAIL PROTECTED] ~/cvs/e17/libs/evas >> mzblame 
> src/lib/engines/common/evas_cpu.c
> ...skip...
> 1.13 (raster   10-Sep-03): void
> 1.3  (rbdpngn  11-Mar-03): evas_common_cpu_sse_test(void)
> 1.3  (rbdpngn  11-Mar-03): {
> 1.25 (raster   22-May-05): #ifdef BUILD_SSE
> 1.27 (raster   31-Jan-06):int blah[16];
> 1.25 (raster   22-May-05): 
> 1.26 (raster   26-Jan-06):movntq_r2m(mm0, blah);
>    ^
> 
> "I fixed that 4 days ago" would've been a perfectly acceptable
> response. :-P

i did - ie "current cvs" :)

> Michael
> 
> -- 
> Michael Jennings (a.k.a. KainX)  http://www.kainx.org/  <[EMAIL PROTECTED]>
> n + 1, Inc., http://www.nplus1.net/   Author, Eterm (www.eterm.org)
> ---
>  "Nerds make the best lovers.  That's why I'm in Speed School." 
>-- Angela Smith
> 
> 
> ---
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> 


-- 
- Codito, ergo sum - "I code, therefore I am" --
The Rasterman (Carsten Haitzler)[EMAIL PROTECTED]
裸好多
Tokyo, Japan (東京 日本)


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel