From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: Date: Sat, 29 Mar 2014 04:56:39 +0100 From: cinap_lenrek@felloff.net To: 9fans@9fans.net MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: [9fans] 6c CMP reg, $0 optimization Topicbox-Message-UUID: d25791a4-ead8-11e9-9d60-3106f5b1d025 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Sat, 29 Mar 2014 00:00:41 -0400 To: 9fans@9fans.net Message-ID: <22d9ef01c400b3de69a449cfa3b9fe85@brasstown.quanstro.net> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] 6c CMP reg, $0 optimization Topicbox-Message-UUID: d25bc846-ead8-11e9-9d60-3106f5b1d025 > 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: Date: Sat, 29 Mar 2014 05:06:40 +0100 From: cinap_lenrek@felloff.net To: 9fans@9fans.net In-Reply-To: <22d9ef01c400b3de69a449cfa3b9fe85@brasstown.quanstro.net> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] 6c CMP reg, $0 optimization Topicbox-Message-UUID: d2604ccc-ead8-11e9-9d60-3106f5b1d025 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 From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: Date: Sat, 29 Mar 2014 04:12:11 +0000 Message-ID: From: Charles Forsyth To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=089e01634074c7cd1b04f5b705de Subject: Re: [9fans] 6c CMP reg, $0 optimization Topicbox-Message-UUID: d264ebec-ead8-11e9-9d60-3106f5b1d025 --089e01634074c7cd1b04f5b705de Content-Type: text/plain; charset=UTF-8 On 29 March 2014 03:56, 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. --089e01634074c7cd1b04f5b705de Content-Type: text/html; charset=UTF-8


at a glance that looks fine to me; i'll merge it in to my copy.
--089e01634074c7cd1b04f5b705de-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Sat, 29 Mar 2014 00:12:35 -0400 To: 9fans@9fans.net Message-ID: <2aea4cff3b5b2e59615eec9e436da834@brasstown.quanstro.net> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] 6c CMP reg, $0 optimization Topicbox-Message-UUID: d269a90c-ead8-11e9-9d60-3106f5b1d025 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