Disko Forum logo Login  |  Register  |  Lost Password
<< Start < Prev 1 2 3 Next > End >>
Re:Slicing text corrumtion with SSE optimizations

Stefan
Posts: 91
graph

Re:Slicing text corrumtion with SSE optimizations 5 Years, 12 Months ago  
Hi Joaquim,

thanks for the thorough testing. It seems that he is removing a variable, that is used in the asm block. There must be a way to tell him to omit this. We will have a deeper look into this, but i agree the compiler is the problem.

kind regards
Stefan
 
  The administrator has disabled public write access.
Re:Slicing text corrumtion with SSE optimizations

Matthias
Posts: 64
graphgraph

Gender: Male Disko Location: Berlin, Germany Birthdate: 1979-04-25
Re:Slicing text corrumtion with SSE optimizations 5 Years, 12 Months ago  
Hi Joaquim,

I agree with you and Stefan. You can try to replace
line 42 in src/mmsgui/fb/fillrectangle/mmsfb_fillrectangle_rgb32.cpp
with:
Code:

unsigned int *dst __attribute__ ((__used__)) = (unsigned int *)dst_planes->ptr;
This should mark the variable dst as used and the compiler shouln't optimize it out. Let us know, if this makes any difference... Best regards, Matthias
 
  The administrator has disabled public write access.
Re:Slicing text corrumtion with SSE optimizations

Duran
Posts: 37
graphgraph

Re:Slicing text corrumtion with SSE optimizations 5 Years, 12 Months ago  
Matthias,

There path is not working. When testing the library with -O1, the compiler has rejected the attribute:

] src/mmsgui/fb/fillrectangle/mmsfb_fillrectangle_blend_ayuv.cpp
src/mmsgui/fb/fillrectangle/mmsfb_fillrectangle_rgb32.cpp: In function ‘void mmsfb_fillrectangle_rgb32(MMSFBSurfacePlanes*, int, int, int, int, int, MMSFBColor)’:
src/mmsgui/fb/fillrectangle/mmsfb_fillrectangle_rgb32.cpp:42: warning: ‘__used__’ attribute ignored

and at execution time, the segmentation is still present.

Joaquim Duran
 
  The administrator has disabled public write access.
Re:Slicing text corrumtion with SSE optimizations

Matthias
Posts: 64
graphgraph

Gender: Male Disko Location: Berlin, Germany Birthdate: 1979-04-25
Re:Slicing text corrumtion with SSE optimizations 5 Years, 12 Months ago  
Ok,

what about using the volatile keyword for *dst and *dst_end? Maybe this will prevent the compiler from optimizing it out.

Code:

// get the first destination ptr/pitch volatile unsigned int *dst = (unsigned int *)dst_planes->ptr; // prepare... int dst_pitch_pix = dst_planes->pitch >> 2; dst+= dx + dy * dst_pitch_pix; volatile unsigned int *dst_end = dst + dst_pitch_pix * dh;
Best regards, Matthias
 
  The administrator has disabled public write access.
Re:Slicing text corrumtion with SSE optimizations

Duran
Posts: 37
graphgraph

Re:Slicing text corrumtion with SSE optimizations 5 Years, 12 Months ago  
Matthias,

The result is the same as ever.

I've the impression that the problem is in the __asm line rather than in the line 42. I think that when the code is optimized, the compiler assigns the 'dst' in one place (eg. a in register), but the assembler is getting the variable from another place (eg, in ram memory) and this causes the segmentation fault.

My suggestion is make a very simple example, eg, copy values from one matrix to another, test that this fails and fill a bug to Fedora (this is the distro that I'm using).

Joaquim Duran
 
  The administrator has disabled public write access.
<< Start < Prev 1 2 3 Next > End >>
Powered by FireBoard
get the latest posts directly to your desktop