From: Ben S. <pow...@16...> - 2014-02-13 13:09:55
|
there total 3 pieces of similiar code, 2 are in genDivMod2 , 1 is in genDivMod1. -- 发自我的网易邮箱手机智能版 在 2014-02-13 18:29:43,"Philipp Klaus Krause" <pk...@sp...> 写道: >Am 13.02.2014 09:53, schrieb Ben Shi: >> Hello, >> >> In line 3641 - 2660, sdcc/src/stm8/gen.c >> >> if (!regDead (X_IDX, ic)) >> { >> if (regDead (XH_IDX, ic)) >> { >> adjustStack (1, FALSE, FALSE, FALSE); >> swap_to_a (XL_IDX); >> pop (ASMOP_A, 0, 1); >> swap_from_a(XL_IDX); >> } >> else if (regDead (XL_IDX, ic)) >> { >> swap_to_a (XH_IDX); >> pop (ASMOP_A, 0, 1); >> swap_from_a(XH_IDX); >> adjustStack (1, FALSE, FALSE, FALSE); >> } >> pop (ASMOP_X, 0, 2); >> } >> >> >> should the two pops there be two pushes ? Or change adjustStack(1, ...) >> to adjustStack(-1, ...) ? >> >> Ben > >No. But there is another bug here: There should be an else before the >pop. Also this section of code could be made more efficent (using a more >exact check than just regDead() on xh and xl). I'll take care of this >today after fixing bug #2253. > >Philipp > >P.S.: Same applies to y. > > >------------------------------------------------------------------------------ >Android apps run on BlackBerry 10 >Introducing the new BlackBerry 10.2.1 Runtime for Android apps. >Now with support for Jelly Bean, Bluetooth, Mapview and more. >Get your Android app in front of a whole new audience. Start now. >http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk >_______________________________________________ >sdcc-devel mailing list >sdc...@li... >https://lists.sourceforge.net/lists/listinfo/sdcc-devel |