Line
Link Here
|
0 |
-- NEW FILE windowmaker-gcc4-x86_64.patch --- |
0 |
++ WindowMaker-0.92.0/wrlib/x86_specific.c 2005-08-22 21:07:57.000000000 +0200 |
1 |
-- WindowMaker-0.92.0/wrlib/x86_specific.c 2004-10-31 02:44:01.000000000 +0100 |
|
|
Lines 98-112
Link Here
|
98 |
int height, |
98 |
int height, |
99 |
int line_offset) |
99 |
int line_offset) |
100 |
{ |
100 |
{ |
101 |
long long rrggbbaa; |
101 |
union { |
102 |
long long pixel; |
102 |
long long rrggbbaa; |
|
|
103 |
struct {short int rr, gg, bb, aa;} words; |
104 |
} rrggbbaa; |
105 |
|
106 |
union { |
107 |
long long pixel; |
108 |
struct {short int rr, gg, bb, aa;} words; |
109 |
} pixel; |
110 |
|
103 |
short *tmp_err; |
111 |
short *tmp_err; |
104 |
short *tmp_nerr; |
112 |
short *tmp_nerr; |
105 |
int x; |
113 |
int x; |
106 |
|
114 |
|
107 |
asm volatile |
115 |
asm volatile |
108 |
( |
116 |
( |
109 |
"pushal \n\t" |
117 |
"pushl %%ebx \n\t" |
110 |
|
118 |
|
111 |
// pack dr, dg and db into mm6 |
119 |
// pack dr, dg and db into mm6 |
112 |
"movl %7, %%eax \n\t" |
120 |
"movl %7, %%eax \n\t" |
Lines 290-296
Link Here
|
290 |
|
298 |
|
291 |
".Enda: \n\t" // THE END |
299 |
".Enda: \n\t" // THE END |
292 |
"emms \n\t" |
300 |
"emms \n\t" |
293 |
"popal \n\t" |
301 |
"popl %%ebx \n\t" |
294 |
: |
302 |
: |
295 |
: |
303 |
: |
296 |
"m" (image), // %0 |
304 |
"m" (image), // %0 |
Lines 309-325
Link Here
|
309 |
"m" (width), // %13 |
317 |
"m" (width), // %13 |
310 |
"m" (height), // %14 |
318 |
"m" (height), // %14 |
311 |
"m" (line_offset), // %15 |
319 |
"m" (line_offset), // %15 |
312 |
"m" (rrggbbaa), // %16 (access to rr) |
320 |
"m" (rrggbbaa.rrggbbaa), // %16 (access to rr) |
313 |
"m" ((*((short*)(&rrggbbaa)+1))), // %17 (access to gg) |
321 |
"m" (rrggbbaa.words.gg), // %17 (access to gg) |
314 |
"m" ((*((short*)(&rrggbbaa)+2))), // %18 (access to bb) |
322 |
"m" (rrggbbaa.words.bb), // %18 (access to bb) |
315 |
"m" ((*((short*)(&rrggbbaa)+3))), // %19 (access to aa) |
323 |
"m" (rrggbbaa.words.aa), // %19 (access to aa) |
316 |
"m" (pixel), // %20 (access to pixel.r) |
324 |
"m" (pixel.pixel), // %20 (access to pixel.r) |
317 |
"m" ((*((short*)(&pixel)+1))), // %21 (access to pixel.g) |
325 |
"m" (pixel.words.gg), // %21 (access to pixel.g) |
318 |
"m" ((*((short*)(&pixel)+2))), // %22 (access to pixel.b) |
326 |
"m" (pixel.words.bb), // %22 (access to pixel.b) |
319 |
"m" ((*((short*)(&pixel)+3))), // %23 (access to pixel.a) |
327 |
"m" (pixel.words.aa), // %23 (access to pixel.a) |
320 |
"m" (tmp_err), // %24 |
328 |
"m" (tmp_err), // %24 |
321 |
"m" (tmp_nerr), // %25 |
329 |
"m" (tmp_nerr), // %25 |
322 |
"m" (x) // %26 |
330 |
"m" (x) // %26 |
|
|
331 |
: "eax", "ecx", "edx", "esi", "edi" |
323 |
); |
332 |
); |
324 |
} |
333 |
} |
325 |
|
334 |
|
Lines 342-349
Link Here
|
342 |
int height, |
351 |
int height, |
343 |
int line_offset) |
352 |
int line_offset) |
344 |
{ |
353 |
{ |
345 |
long long rrggbbaa; |
354 |
union { |
346 |
long long pixel; |
355 |
long long rrggbbaa; |
|
|
356 |
struct {short int rr, gg, bb, aa;} words; |
357 |
} rrggbbaa; |
358 |
|
359 |
union { |
360 |
long long pixel; |
361 |
struct {short int rr, gg, bb, aa;} words; |
362 |
} pixel; |
347 |
|
363 |
|
348 |
short *tmp_err; |
364 |
short *tmp_err; |
349 |
short *tmp_nerr; |
365 |
short *tmp_nerr; |
Lines 354-360
Link Here
|
354 |
|
370 |
|
355 |
asm volatile |
371 |
asm volatile |
356 |
( |
372 |
( |
357 |
"pushal \n\t" |
373 |
"pushl %%ebx \n\t" |
358 |
|
374 |
|
359 |
"movl %13, %%eax \n\t" // eax = width |
375 |
"movl %13, %%eax \n\t" // eax = width |
360 |
"movl %%eax, %%ebx \n\t" |
376 |
"movl %%eax, %%ebx \n\t" |
Lines 424-430
Link Here
|
424 |
|
440 |
|
425 |
".Endc: \n\t" // THE END |
441 |
".Endc: \n\t" // THE END |
426 |
"emms \n\t" |
442 |
"emms \n\t" |
427 |
"popal \n\t" |
443 |
"popl %%ebx \n\t" |
428 |
: |
444 |
: |
429 |
: |
445 |
: |
430 |
"m" (image), // %0 |
446 |
"m" (image), // %0 |
Lines 443-461
Link Here
|
443 |
"m" (width), // %13 |
459 |
"m" (width), // %13 |
444 |
"m" (height), // %14 |
460 |
"m" (height), // %14 |
445 |
"m" (line_offset), // %15 |
461 |
"m" (line_offset), // %15 |
446 |
"m" (rrggbbaa), // %16 (access to rr) |
462 |
"m" (rrggbbaa.rrggbbaa), // %16 (access to rr) |
447 |
"m" ((*((short*)(&rrggbbaa)+1))), // %17 (access to gg) |
463 |
"m" (rrggbbaa.words.gg), // %17 (access to gg) |
448 |
"m" ((*((short*)(&rrggbbaa)+2))), // %18 (access to bb) |
464 |
"m" (rrggbbaa.words.bb), // %18 (access to bb) |
449 |
"m" ((*((short*)(&rrggbbaa)+3))), // %19 (access to aa) |
465 |
"m" (rrggbbaa.words.aa), // %19 (access to aa) |
450 |
"m" (pixel), // %20 (access to pixel.r) |
466 |
"m" (pixel.pixel), // %20 (access to pixel.r) |
451 |
"m" ((*((short*)(&pixel)+1))), // %21 (access to pixel.g) |
467 |
"m" (pixel.words.gg), // %21 (access to pixel.g) |
452 |
"m" ((*((short*)(&pixel)+2))), // %22 (access to pixel.b) |
468 |
"m" (pixel.words.bb), // %22 (access to pixel.b) |
453 |
"m" ((*((short*)(&pixel)+3))), // %23 (access to pixel.a) |
469 |
"m" (pixel.words.aa), // %23 (access to pixel.a) |
454 |
"m" (tmp_err), // %24 |
470 |
"m" (tmp_err), // %24 |
455 |
"m" (tmp_nerr), // %25 |
471 |
"m" (tmp_nerr), // %25 |
456 |
"m" (x), // %26 |
472 |
"m" (x), // %26 |
457 |
"m" (w1), // %27 |
473 |
"m" (w1), // %27 |
458 |
"m" (w2) // %28 |
474 |
"m" (w2) // %28 |
|
|
475 |
: "eax", "ecx", "edx", "esi", "edi" |
459 |
); |
476 |
); |
460 |
} |
477 |
} |
461 |
|
478 |
|