[webkit-dev] useless mov instructions

Ágoston Róbert robigszi at gmail.com
Wed Aug 5 08:35:26 PDT 2009


hi!

I just experiment with squirrelfish bytecode generating, and I think I
find something
strange. After each mov instruction, where the source is a constant
register, there is
an other mov instruction, which moves the previous destination to r0.
I think these instructions are useless. Is there any reason why are
they generated?

There is an example:
js:

var r_15;
var r_16;
var r_17;
var r_18;
r_15 = 1;
r_16 = 2;
r_17 = 3;
r_17 = 4;

generated:
[   0] enter
[   1] mov               r-15, r1073741824
[   4] mov               r-16, r1073741824
[   7] mov               r-17, r1073741824
[  10] mov               r-18, r1073741824
[  13] mov               r0, r1073741824
[  16] mov               r-15, r1073741825
[  19] mov               r0, r-15
[  22] mov               r-16, r1073741826
[  25] mov               r0, r-16
[  28] mov               r-17, r1073741827
[  31] mov               r0, r-17
[  34] mov               r-17, r1073741828
[  37] mov               r0, r-17
[  40] end               r0

-Robert


More information about the webkit-dev mailing list