<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>114811</bug_id>
          
          <creation_ts>2013-04-18 06:40:12 -0700</creation_ts>
          <short_desc>LLInt ARM backend should not use the d8 register as scratch register</short_desc>
          <delta_ts>2013-07-22 15:21:10 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>JavaScriptCore</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>108645</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Gabor Rapcsanyi">rgabor</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>barraclough</cc>
    
    <cc>benjamin</cc>
    
    <cc>commit-queue</cc>
    
    <cc>fpizlo</cc>
    
    <cc>oliver</cc>
    
    <cc>ossy</cc>
    
    <cc>sg5.lee</cc>
    
    <cc>zherczeg</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>877867</commentid>
    <comment_count>0</comment_count>
    <who name="Gabor Rapcsanyi">rgabor</who>
    <bug_when>2013-04-18 06:40:12 -0700</bug_when>
    <thetext>LLInt ARM backend is using d8 register as scratch register but the ARM ABI says that d8-d15 registers must be preserved across subroutine calls.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>877869</commentid>
    <comment_count>1</comment_count>
      <attachid>198731</attachid>
    <who name="Gabor Rapcsanyi">rgabor</who>
    <bug_when>2013-04-18 06:42:41 -0700</bug_when>
    <thetext>Created attachment 198731
proposed fix</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>878055</commentid>
    <comment_count>2</comment_count>
    <who name="Benjamin Poulain">benjamin</who>
    <bug_when>2013-04-18 13:31:46 -0700</bug_when>
    <thetext>I don&apos;t know much about LLInt, but why does the ABI matters at all here?
I would think the only thing that matters is follow the JIT conventions(?).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>878077</commentid>
    <comment_count>3</comment_count>
    <who name="Filip Pizlo">fpizlo</who>
    <bug_when>2013-04-18 14:12:32 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; I don&apos;t know much about LLInt, but why does the ABI matters at all here?
&gt; I would think the only thing that matters is follow the JIT conventions(?).

I think that the LLInt uses more scratch registers, and it doesn&apos;t have to use the same scratch registers as the JIT.  So this change looks valid to me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>878097</commentid>
    <comment_count>4</comment_count>
      <attachid>198731</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2013-04-18 14:55:16 -0700</bug_when>
    <thetext>Comment on attachment 198731
proposed fix

Clearing flags on attachment: 198731

Committed r148705: &lt;http://trac.webkit.org/changeset/148705&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>878098</commentid>
    <comment_count>5</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2013-04-18 14:55:18 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>888031</commentid>
    <comment_count>6</comment_count>
    <who name="SangGyu Lee">sg5.lee</who>
    <bug_when>2013-05-12 16:36:24 -0700</bug_when>
    <thetext>Is there any reason to duplicate my preceding bug report and fix (https://bugs.webkit.org/show_bug.cgi?id=114495) as new one?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>888035</commentid>
    <comment_count>7</comment_count>
    <who name="Benjamin Poulain">benjamin</who>
    <bug_when>2013-05-12 17:11:14 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; Is there any reason to duplicate my preceding bug report and fix (https://bugs.webkit.org/show_bug.cgi?id=114495) as new one?

In WebKit, we care about:
-bug report with the best patch.
-bug report with the best info.

The order in which bugs are reported does not matter. We dupe backward or forward to the best bug report.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>888133</commentid>
    <comment_count>8</comment_count>
    <who name="Gabor Rapcsanyi">rgabor</who>
    <bug_when>2013-05-13 00:51:19 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; Is there any reason to duplicate my preceding bug report and fix (https://bugs.webkit.org/show_bug.cgi?id=114495) as new one?

Sorry, I forgot to check before I reported and fixed it. I found this bug after debugging a bug for a week.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>888155</commentid>
    <comment_count>9</comment_count>
    <who name="SangGyu Lee">sg5.lee</who>
    <bug_when>2013-05-13 02:25:38 -0700</bug_when>
    <thetext>Hello, Benjamin Poulain 

&gt; In WebKit, we care about:
&gt; -bug report with the best patch.
&gt; -bug report with the best info.

&gt; The order in which bugs are reported does not matter. We dupe backward or 
&gt; forward to the best bug report.

What do you mean by &quot;best patch&quot; or &quot;best info&quot;?

Do you mean followings?

1) I didn&apos;t make my suggested patch as attached patch.
2) I didn&apos;t request to reviewer more aggressively (by using IRC or by sending mail again and again)

I cannot find the difference between mine and this one:

title(114495-mine): LLInt should not use d8 register as scratch register
title(114811-this): LLInt ARM backend should not use the d8 register as scratch register 

and here is my bug report:

Currently, LLInt uses d8 register as scratch register as followings:

ARM_SCRATCH_FPR = SpecialRegister.new(&quot;d8&quot;)    in arm.rb
C_LOOP_SCRATCH_FPR = SpecialRegister.new(&quot;d8&quot;) in cloop.rb

However, AAPCS §5.1.2.1 says

Registers s16-s31 (d8-d15, q4-q7) must be preserved across subroutine calls; registers s0-s15 (d0-d7, q0-q3) do not need to be preserved (and can be used for passing arguments or returning results in standard procedure-call variants). Registers d16-d31 (q8-q15), if present, do not need to be preserved.

Therefore it should not use d8 for that purpose.

I think it would be safe to use d6.
(Register d7 is already in use for other purpose. )

ARM_SCRATCH_FPR = SpecialRegister.new(&quot;d6&quot;)    in arm.rb
C_LOOP_SCRATCH_FPR = SpecialRegister.new(&quot;d6&quot;) in cloop.rb</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>888170</commentid>
    <comment_count>10</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2013-05-13 03:20:16 -0700</bug_when>
    <thetext>Gábor ran into the same bug and then reported and fixed it quickly.
And then apologized to you because he didn&apos;t check/find if there was 
already a bug report about this bug. Additionally it isn&apos;t so easy to 
find it, because there are 15847 unconfirmed/new bugs now. If you file
a new bug report without cc-ing/poke-ing folks maybe nobody will notice
that you filed a new bug report.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>910845</commentid>
    <comment_count>11</comment_count>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2013-07-22 15:21:10 -0700</bug_when>
    <thetext>*** Bug 114495 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>198731</attachid>
            <date>2013-04-18 06:42:41 -0700</date>
            <delta_ts>2013-04-18 14:55:15 -0700</delta_ts>
            <desc>proposed fix</desc>
            <filename>llint_register.patch</filename>
            <type>text/plain</type>
            <size>1348</size>
            <attacher name="Gabor Rapcsanyi">rgabor</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9KYXZhU2NyaXB0Q29yZS9DaGFuZ2VMb2cKPT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gU291
cmNlL0phdmFTY3JpcHRDb3JlL0NoYW5nZUxvZwkocmV2aXNpb24gMTQ4NjcxKQorKysgU291cmNl
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