* [9fans] 6c CMP reg, $0 optimization
@ 2014-03-29 3:56 cinap_lenrek
2014-03-29 4:00 ` erik quanstrom
2014-03-29 4:12 ` Charles Forsyth
0 siblings, 2 replies; 5+ messages in thread
From: cinap_lenrek @ 2014-03-29 3:56 UTC (permalink / raw)
To: 9fans
i changed the compiler to remove unneeded compare with
zero instructions when the previous instruction already
sets the zero flag in the peephole optimizaiton pass.
http://felloff.net/usr/cinap_lenrek/6cpeep.diff
this removes compares for zero/non zero tests only.
it only looks at the previous non-nop instruction
to see if it sets our compare value register.
it seems to work fine so far. our pc64 kernel got
arround 8K smaller, ghostscript got 5K smaller.
i'm not a compiler expert tho, so i'd like to hear if
there are any issues with this approach or if there are
better ways to do this.
--
cinap
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [9fans] 6c CMP reg, $0 optimization
2014-03-29 3:56 [9fans] 6c CMP reg, $0 optimization cinap_lenrek
@ 2014-03-29 4:00 ` erik quanstrom
2014-03-29 4:06 ` cinap_lenrek
2014-03-29 4:12 ` Charles Forsyth
1 sibling, 1 reply; 5+ messages in thread
From: erik quanstrom @ 2014-03-29 4:00 UTC (permalink / raw)
To: 9fans
> it seems to work fine so far. our pc64 kernel got
> arround 8K smaller, ghostscript got 5K smaller.
it would be nice if ghostscript worked much at all on
64-bit machines. :-)
- erik
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [9fans] 6c CMP reg, $0 optimization
2014-03-29 4:00 ` erik quanstrom
@ 2014-03-29 4:06 ` cinap_lenrek
2014-03-29 4:12 ` erik quanstrom
0 siblings, 1 reply; 5+ messages in thread
From: cinap_lenrek @ 2014-03-29 4:06 UTC (permalink / raw)
To: 9fans
what? i'm having no issues with ghostscript on amd64.
do you have issues with some specific documents? the
ones in /sys/doc work fine for me.
--
cinap
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [9fans] 6c CMP reg, $0 optimization
2014-03-29 3:56 [9fans] 6c CMP reg, $0 optimization cinap_lenrek
2014-03-29 4:00 ` erik quanstrom
@ 2014-03-29 4:12 ` Charles Forsyth
1 sibling, 0 replies; 5+ messages in thread
From: Charles Forsyth @ 2014-03-29 4:12 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
[-- Attachment #1: Type: text/plain, Size: 184 bytes --]
On 29 March 2014 03:56, <cinap_lenrek@felloff.net> wrote:
>
> http://felloff.net/usr/cinap_lenrek/6cpeep.diff
at a glance that looks fine to me; i'll merge it in to my copy.
[-- Attachment #2: Type: text/html, Size: 563 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [9fans] 6c CMP reg, $0 optimization
2014-03-29 4:06 ` cinap_lenrek
@ 2014-03-29 4:12 ` erik quanstrom
0 siblings, 0 replies; 5+ messages in thread
From: erik quanstrom @ 2014-03-29 4:12 UTC (permalink / raw)
To: 9fans
On Sat Mar 29 00:08:06 EDT 2014, cinap_lenrek@felloff.net wrote:
> what? i'm having no issues with ghostscript on amd64.
> do you have issues with some specific documents? the
> ones in /sys/doc work fine for me.
any intel datasheet, for example this one works on arm, mips
- erik
---
; page 82574.pdf # google 82574 datasheet
reading through pdf...
Ghostscript Error:
Error: /undefined in --setcolor--
Operand stack:
--dict:7/7(L)-- (Order) 0 0 0 --nostringval-- --nostringval-- cs_prepare_color --dict:13/20(G)-- --nostringval--
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1 3 %oparray_pop 1 3 %oparray_pop 1 3 %oparray_pop 1 3 %oparray_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- %array_continue --nostringval-- false 1 %stopped_push --nostringval-- %loop_continue --nostringval-- --nostringval-- --nostringvafatal: readimage error
l-- %array_continue --nostringval-- --nostringval-- 6 8 %oparray_pop
Dictionary stack:
--dict:1127/1686(ro)(G)-- --dict:2/20(G)-- --dict:78/200(L)-- --dict:105/127(ro)(G)-- --dict:258/347(ro)(G)-- --dict:21/24(L)-- --dict:4/6(L)-- --dict:25/32(L)--
Current allocation mode is local
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-03-29 4:12 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-29 3:56 [9fans] 6c CMP reg, $0 optimization cinap_lenrek
2014-03-29 4:00 ` erik quanstrom
2014-03-29 4:06 ` cinap_lenrek
2014-03-29 4:12 ` erik quanstrom
2014-03-29 4:12 ` Charles Forsyth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).