[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freetype-devel
Subject:    [ft-devel] Re: Re: Fw: Compile Error use arm-linux-gcc3.4.1
From:       "Johnson Y. Yan" <yinsen_yan () foxitsoftware ! com>
Date:       2011-01-16 1:28:51
Message-ID: 201101160928483596730 () foxitsoftware ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]

[Attachment #4 (text/plain)]

Thanks freetype team, I use "orr    %0, %0, %2, lsl #16\n\t"  /* %0 |= %2 << 16 */, and it work fine now.

Johnson Y. Yan



发件人: mpsuzuki
发送时间: 2011-01-15 20:49:46
收件人: yinsen_yan
抄送: freetype; freetype-devel
主题: Re: Fw: Compile Error use arm-linux-gcc3.4.1

Dear Johnson,
I guess this failure has following scenario and not
related with ARM instruction set. I found that quite
similar error was found by Qt developers:
  http://bugreports.qt.nokia.com/browse/QTBUG-6521
1) You build with default ftconfig.h in "include/freetype/config/ftconfig.h",
   instead of auto-configured ftconfig.h in "builds/unix/ftconfig.h".
   It is not so popular for the cross developers using
   configure (so the error reproduction could be tricky),
   but it might be popular for the projects that include
   FreeType2 source code and build with external configurators,
   aslike Qt.
2) FT_MulFix_arm() in include/freetype/config/ftconfig.h has
   a problematic syntax, an argument to "orr" instruction is
   omitted. On the other hand, builds/unix/ftconfig.h does
   not have.
   include/freetype/config/ftconfig.h
   ----------------------------------
    asm __volatile__ (
      "smull  %1, %2, %4, %3\n\t"   /* (lo=%1,hi=%2) = a*b */
      "mov    %0, %2, asr #31\n\t"  /* %0  = (hi >> 31) */
      "add    %0, %0, #0x8000\n\t"  /* %0 += 0x8000 */
      "adds   %1, %1, %0\n\t"       /* %1 += %0 */
      "adc    %2, %2, #0\n\t"       /* %2 += carry */
      "mov    %0, %1, lsr #16\n\t"  /* %0  = %1 >> 16 */
      "orr    %0, %2, lsl #16\n\t"  /* %0 |= %2 << 16 */
   builds/unix/ftconfig.in
   -----------------------
    __asm__ __volatile__ (
      "smull  %1, %2, %4, %3\n\t"       /* (lo=%1,hi=%2) = a*b */
      "mov    %0, %2, asr #31\n\t"      /* %0  = (hi >> 31) */
      "add    %0, %0, #0x8000\n\t"      /* %0 += 0x8000 */
      "adds   %1, %1, %0\n\t"           /* %1 += %0 */
      "adc    %2, %2, #0\n\t"           /* %2 += carry */
      "mov    %0, %1, lsr #16\n\t"      /* %0  = %1 >> 16 */
      "orr    %0, %0, %2, lsl #16\n\t"  /* %0 |= %2 << 16 */
   You can find the number of arguments to "orr" is different.
3) The earlier version of GNU binutils does not accept this
   "omitted" syntax, although latest version (binutils-2.21,
   I've tested) accepts it. As far as using GNU binutils (to
   reproduce this error, I used GNU binutils-2.12), even if
   I add "-march=armv5" to GCC, the problem occurs. So I
   think this is not related with the incorrect instruction
   set.
4) Therefore, I guess, fixing the omitted syntax in
   include/freetype/config/ftconfig.h
   may help you...? Also, "__asm__" would be better "asm".
I've fixed in GIT. Please check if the fix of the argument
number can help you.
diff --git a/ChangeLog b/ChangeLog
index c3dff28..fcc47ee 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,19 @@
 2011-01-15  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>

+ Fix ARM assembly code in include/freetype/config/ftconfig.h.
+
+ * include/freetype/config/ftconfig.h (FT_MulFix_arm):
+ Copy the maintained code from builds/unix/ftconfig.in.
+ Old GNU binutils could not accept the reduced syntax
+ `orr %0, %2, lsl #16'.  Un-omitted syntax like RVCT,
+ `orr %0, %0, %2, lsl #16' is better.  Reported by
+ Johnson Y. Yan.  The bug report by Qt developers is
+ considered too.
+
+ http://bugreports.qt.nokia.com/browse/QTBUG-6521
+
+2011-01-15  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
+
  Copy -mcpu=* & -march=* options from CFLAGS to LDFLAGS.

  * builds/unix/configure.raw: Consider recent gcc-standard
diff --git a/builds/unix/install-sh b/builds/unix/install-sh
old mode 100644
new mode 100755
diff --git a/include/freetype/config/ftconfig.h b/include/freetype/config/ftconfig.h
index cbe30f2..bcbcd6f 100644
--- a/include/freetype/config/ftconfig.h
+++ b/include/freetype/config/ftconfig.h
@@ -348,14 +348,14 @@ FT_BEGIN_HEADER
     register FT_Int32  t, t2;


-    asm __volatile__ (
-      "smull  %1, %2, %4, %3\n\t"   /* (lo=%1,hi=%2) = a*b */
-      "mov    %0, %2, asr #31\n\t"  /* %0  = (hi >> 31) */
-      "add    %0, %0, #0x8000\n\t"  /* %0 += 0x8000 */
-      "adds   %1, %1, %0\n\t"       /* %1 += %0 */
-      "adc    %2, %2, #0\n\t"       /* %2 += carry */
-      "mov    %0, %1, lsr #16\n\t"  /* %0  = %1 >> 16 */
-      "orr    %0, %2, lsl #16\n\t"  /* %0 |= %2 << 16 */
+    __asm__ __volatile__ (
+      "smull  %1, %2, %4, %3\n\t"       /* (lo=%1,hi=%2) = a*b */
+      "mov    %0, %2, asr #31\n\t"      /* %0  = (hi >> 31) */
+      "add    %0, %0, #0x8000\n\t"      /* %0 += 0x8000 */
+      "adds   %1, %1, %0\n\t"           /* %1 += %0 */
+      "adc    %2, %2, #0\n\t"           /* %2 += carry */
+      "mov    %0, %1, lsr #16\n\t"      /* %0  = %1 >> 16 */
+      "orr    %0, %0, %2, lsl #16\n\t"  /* %0 |= %2 << 16 */
       : "=r"(a), "=&r"(t2), "=&r"(t)
       : "r"(a), "r"(b) );
     return a;
Regards,
mpsuzuki
On Sat, 15 Jan 2011 19:54:11 +0900
suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> wrote:
>Dear Johnson,
>
>I will take a look, but I don't have ARMv4 machine to check
>the assembly code. Could you help me to check the revised
>version will work or not? The easiest/simplest fix would be
>disabling the assembly code for smaller versions of ARM
>architecture, but it won't be what you want...
>
>Regards,
>mpsuzuki
>
>Werner LEMBERG wrote:
>> ARM developers, please comment and help if possible!

[Attachment #5 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2900.6049" name=GENERATOR>
<STYLE>@font-face {
	font-family: 宋体;
}
@font-face {
	font-family: Verdana;
}
@font-face {
	font-family: @宋体;
}
@page Section1 {size: 595.3pt 841.9pt; margin: 72.0pt 90.0pt 72.0pt 90.0pt; \
layout-grid: 15.6pt; } P.MsoNormal {
	TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 10.5pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: \
"Times New Roman"; TEXT-ALIGN: justify }
LI.MsoNormal {
	TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 10.5pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: \
"Times New Roman"; TEXT-ALIGN: justify }
DIV.MsoNormal {
	TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 10.5pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: \
"Times New Roman"; TEXT-ALIGN: justify }
A:link {
	COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
	COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
	COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
	COLOR: purple; TEXT-DECORATION: underline
}
SPAN.EmailStyle17 {
	FONT-WEIGHT: normal; COLOR: windowtext; FONT-STYLE: normal; FONT-FAMILY: Verdana; \
TEXT-DECORATION: none; mso-style-type: personal-compose }
DIV.Section1 {
	page: Section1
}
BLOCKQUOTE {
	MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; MARGIN-LEFT: 2em
}
OL {
	MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
UL {
	MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
</STYLE>
</HEAD>
<BODY style="MARGIN-TOP: 10px; MARGIN-LEFT: 10px; MARGIN-RIGHT: 10px">
<DIV><FONT face=Verdana color=#0000ff size=2><FONT color=#000000>Thanks freetype 
team, I use</FONT> <FONT 
color=#000000>"orr&nbsp;&nbsp;&nbsp;&nbsp;%0,&nbsp;%0,&nbsp;%2,&nbsp;lsl&nbsp;#16\n\t"&nbsp;&nbsp;/*&nbsp;%0&nbsp;|=&nbsp;%2&nbsp;&lt;&lt;&nbsp;16&nbsp;*/, \
 and it work fine now.</FONT></FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT>&nbsp;</DIV>
<DIV align=left>
<DIV align=left><FONT face=Verdana size=2></FONT></DIV>
<DIV><FONT face=Verdana size=2>Johnson Y. Yan</FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT></DIV></DIV>
<DIV><FONT face=Verdana size=2>
<HR>
</FONT></DIV>
<DIV><FONT face=Verdana><FONT size=2><STRONG>发件人:</STRONG> 
mpsuzuki</FONT></FONT></DIV>
<DIV><FONT face=Verdana><FONT size=2><STRONG>发送时间:</STRONG> 
2011-01-15&nbsp;20:49:46</FONT></FONT></DIV>
<DIV><FONT face=Verdana><FONT size=2><STRONG>收件人:</STRONG> 
yinsen_yan</FONT></FONT></DIV>
<DIV><FONT face=Verdana><FONT size=2><STRONG>抄送:</STRONG> freetype; 
freetype-devel</FONT></FONT></DIV>
<DIV><FONT face=Verdana><FONT size=2><STRONG>主题:</STRONG> Re: Fw: Compile Error 
use arm-linux-gcc3.4.1</FONT></FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Verdana size=2>
<DIV>Dear&nbsp;Johnson,</DIV>
<DIV></DIV>
<DIV>I&nbsp;guess&nbsp;this&nbsp;failure&nbsp;has&nbsp;following&nbsp;scenario&nbsp;and&nbsp;not</DIV>
 <DIV>related&nbsp;with&nbsp;ARM&nbsp;instruction&nbsp;set.&nbsp;I&nbsp;found&nbsp;that&nbsp;quite</DIV>
 <DIV>similar&nbsp;error&nbsp;was&nbsp;found&nbsp;by&nbsp;Qt&nbsp;developers:</DIV>
<DIV>&nbsp;&nbsp;http://bugreports.qt.nokia.com/browse/QTBUG-6521</DIV>
<DIV></DIV>
<DIV>1)&nbsp;You&nbsp;build&nbsp;with&nbsp;default&nbsp;ftconfig.h&nbsp;in&nbsp;"include/freetype/config/ftconfig.h",</DIV>
 <DIV>&nbsp;&nbsp;&nbsp;instead&nbsp;of&nbsp;auto-configured&nbsp;ftconfig.h&nbsp;in&nbsp;"builds/unix/ftconfig.h".</DIV>
 <DIV>&nbsp;&nbsp;&nbsp;It&nbsp;is&nbsp;not&nbsp;so&nbsp;popular&nbsp;for&nbsp;the&nbsp;cross&nbsp;developers&nbsp;using</DIV>
 <DIV>&nbsp;&nbsp;&nbsp;configure&nbsp;(so&nbsp;the&nbsp;error&nbsp;reproduction&nbsp;could&nbsp;be&nbsp;tricky),</DIV>
 <DIV>&nbsp;&nbsp;&nbsp;but&nbsp;it&nbsp;might&nbsp;be&nbsp;popular&nbsp;for&nbsp;the&nbsp;projects&nbsp;that&nbsp;include</DIV>
 <DIV>&nbsp;&nbsp;&nbsp;FreeType2&nbsp;source&nbsp;code&nbsp;and&nbsp;build&nbsp;with&nbsp;external&nbsp;configurators,</DIV>
 <DIV>&nbsp;&nbsp;&nbsp;aslike&nbsp;Qt.</DIV>
<DIV></DIV>
<DIV>2)&nbsp;FT_MulFix_arm()&nbsp;in&nbsp;include/freetype/config/ftconfig.h&nbsp;has</DIV>
 <DIV>&nbsp;&nbsp;&nbsp;a&nbsp;problematic&nbsp;syntax,&nbsp;an&nbsp;argument&nbsp;to&nbsp;"orr"&nbsp;instruction&nbsp;is</DIV>
 <DIV>&nbsp;&nbsp;&nbsp;omitted.&nbsp;On&nbsp;the&nbsp;other&nbsp;hand,&nbsp;builds/unix/ftconfig.h&nbsp;does</DIV>
 <DIV>&nbsp;&nbsp;&nbsp;not&nbsp;have.</DIV>
<DIV></DIV>
<DIV>&nbsp;&nbsp;&nbsp;include/freetype/config/ftconfig.h</DIV>
<DIV>&nbsp;&nbsp;&nbsp;----------------------------------</DIV>
<DIV></DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;asm&nbsp;__volatile__&nbsp;(</DIV>
<DIV>&nbsp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nbsp;&nbsp;&nbsp;/*&nbsp;%1&nbsp;+=&nbsp;%0&nbsp;*/</DIV>
 <DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"adc&nbsp;&nbsp;&nbsp;&nbsp;%2,&nbsp;%2,&nbs \
p;#0\n\t"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/*&nbsp;%2&nbsp;+=&nbsp;carry&nbsp;*/</DIV>
 <DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"mov&nbsp;&nbsp;&nbsp;&nbsp;%0,&nbsp;%1,&nbs \
p;lsr&nbsp;#16\n\t"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/*&nbsp;%0&nbsp;&nbsp;=&nbsp;%1&nbsp;&gt;&gt;&nbsp;16&nbsp;*/</DIV>
 <DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"orr&nbsp;&nbsp;&nbsp;&nbsp;%0,&nbsp;%0,&nbs \
p;%2,&nbsp;lsl&nbsp;#16\n\t"&nbsp;&nbsp;/*&nbsp;%0&nbsp;|=&nbsp;%2&nbsp;&lt;&lt;&nbsp;16&nbsp;*/</DIV>
 <DIV></DIV>
<DIV>&nbsp;&nbsp;&nbsp;You&nbsp;can&nbsp;find&nbsp;the&nbsp;number&nbsp;of&nbsp;arguments&nbsp;to&nbsp;"orr"&nbsp;is&nbsp;different.</DIV>
 <DIV></DIV>
<DIV>3)&nbsp;The&nbsp;earlier&nbsp;version&nbsp;of&nbsp;GNU&nbsp;binutils&nbsp;does&nbsp;not&nbsp;accept&nbsp;this</DIV>
 <DIV>&nbsp;&nbsp;&nbsp;"omitted"&nbsp;syntax,&nbsp;although&nbsp;latest&nbsp;version&nbsp;(binutils-2.21,</DIV>
 <DIV>&nbsp;&nbsp;&nbsp;I've&nbsp;tested)&nbsp;accepts&nbsp;it.&nbsp;As&nbsp;far&nbsp;as&nbsp;using&nbsp;GNU&nbsp;binutils&nbsp;(to</DIV>
 <DIV>&nbsp;&nbsp;&nbsp;reproduce&nbsp;this&nbsp;error,&nbsp;I&nbsp;used&nbsp;GNU&nbsp;binutils-2.12),&nbsp;even&nbsp;if</DIV>
 <DIV>&nbsp;&nbsp;&nbsp;I&nbsp;add&nbsp;"-march=armv5"&nbsp;to&nbsp;GCC,&nbsp;the&nbsp;problem&nbsp;occurs.&nbsp;So&nbsp;I</DIV>
 <DIV>&nbsp;&nbsp;&nbsp;think&nbsp;this&nbsp;is&nbsp;not&nbsp;related&nbsp;with&nbsp;the&nbsp;incorrect&nbsp;instruction</DIV>
 <DIV>&nbsp;&nbsp;&nbsp;set.</DIV>
<DIV></DIV>
<DIV>4)&nbsp;Therefore,&nbsp;I&nbsp;guess,&nbsp;fixing&nbsp;the&nbsp;omitted&nbsp;syntax&nbsp;in</DIV>
 <DIV>&nbsp;&nbsp;&nbsp;include/freetype/config/ftconfig.h</DIV>
<DIV>&nbsp;&nbsp;&nbsp;may&nbsp;help&nbsp;you...?&nbsp;Also,&nbsp;"__asm__"&nbsp;would&nbsp;be&nbsp;better&nbsp;"asm".</DIV>
 <DIV></DIV>
<DIV>I've&nbsp;fixed&nbsp;in&nbsp;GIT.&nbsp;Please&nbsp;check&nbsp;if&nbsp;the&nbsp;fix&nbsp;of&nbsp;the&nbsp;argument</DIV>
 <DIV>number&nbsp;can&nbsp;help&nbsp;you.</DIV>
<DIV></DIV>
<DIV>diff&nbsp;--git&nbsp;a/ChangeLog&nbsp;b/ChangeLog</DIV>
<DIV>index&nbsp;c3dff28..fcc47ee&nbsp;100644</DIV>
<DIV>---&nbsp;a/ChangeLog</DIV>
<DIV>+++&nbsp;b/ChangeLog</DIV>
<DIV>@@&nbsp;-1,5&nbsp;+1,19&nbsp;@@</DIV>
<DIV>&nbsp;2011-01-15&nbsp;&nbsp;suzuki&nbsp;toshiya&nbsp;&nbsp;&lt;mpsuzuki@hiroshima-u.ac.jp&gt;</DIV>
 <DIV>&nbsp;</DIV>
<DIV>+ 
Fix&nbsp;ARM&nbsp;assembly&nbsp;code&nbsp;in&nbsp;include/freetype/config/ftconfig.h.</DIV>
 <DIV>+</DIV>
<DIV>+ *&nbsp;include/freetype/config/ftconfig.h&nbsp;(FT_MulFix_arm):</DIV>
<DIV>+ 
Copy&nbsp;the&nbsp;maintained&nbsp;code&nbsp;from&nbsp;builds/unix/ftconfig.in.</DIV>
<DIV>+ 
Old&nbsp;GNU&nbsp;binutils&nbsp;could&nbsp;not&nbsp;accept&nbsp;the&nbsp;reduced&nbsp;syntax</DIV>
 <DIV>+ 
`orr&nbsp;%0,&nbsp;%2,&nbsp;lsl&nbsp;#16'.&nbsp;&nbsp;Un-omitted&nbsp;syntax&nbsp;like&nbsp;RVCT,</DIV>
 <DIV>+ 
`orr&nbsp;%0,&nbsp;%0,&nbsp;%2,&nbsp;lsl&nbsp;#16'&nbsp;is&nbsp;better.&nbsp;&nbsp;Reported&nbsp;by</DIV>
 <DIV>+ 
Johnson&nbsp;Y.&nbsp;Yan.&nbsp;&nbsp;The&nbsp;bug&nbsp;report&nbsp;by&nbsp;Qt&nbsp;developers&nbsp;is</DIV>
 <DIV>+ considered&nbsp;too.</DIV>
<DIV>+</DIV>
<DIV>+ http://bugreports.qt.nokia.com/browse/QTBUG-6521</DIV>
<DIV>+</DIV>
<DIV>+2011-01-15&nbsp;&nbsp;suzuki&nbsp;toshiya&nbsp;&nbsp;&lt;mpsuzuki@hiroshima-u.ac.jp&gt;</DIV>
 <DIV>+</DIV>
<DIV>&nbsp; 
Copy&nbsp;-mcpu=*&nbsp;&amp;&nbsp;-march=*&nbsp;options&nbsp;from&nbsp;CFLAGS&nbsp;to&nbsp;LDFLAGS.</DIV>
 <DIV>&nbsp;</DIV>
<DIV>&nbsp; 
*&nbsp;builds/unix/configure.raw:&nbsp;Consider&nbsp;recent&nbsp;gcc-standard</DIV>
<DIV>diff&nbsp;--git&nbsp;a/builds/unix/install-sh&nbsp;b/builds/unix/install-sh</DIV>
 <DIV>old&nbsp;mode&nbsp;100644</DIV>
<DIV>new&nbsp;mode&nbsp;100755</DIV>
<DIV>diff&nbsp;--git&nbsp;a/include/freetype/config/ftconfig.h&nbsp;b/include/freetype/config/ftconfig.h</DIV>
 <DIV>index&nbsp;cbe30f2..bcbcd6f&nbsp;100644</DIV>
<DIV>---&nbsp;a/include/freetype/config/ftconfig.h</DIV>
<DIV>+++&nbsp;b/include/freetype/config/ftconfig.h</DIV>
<DIV>@@&nbsp;-348,14&nbsp;+348,14&nbsp;@@&nbsp;FT_BEGIN_HEADER</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;register&nbsp;FT_Int32&nbsp;&nbsp;t,&nbsp;t2;</DIV>
 <DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>-&nbsp;&nbsp;&nbsp;&nbsp;asm&nbsp;__volatile__&nbsp;(</DIV>
<DIV>-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"smull&nbsp;&nbsp;%1,&nbsp;%2,&nbsp;%4,&nbsp;%3\n\t"&nbsp;&nbsp;&nbsp;/*&nbsp;(lo=%1,hi=%2)&nbsp;=&nbsp;a*b&nbsp;*/</DIV>
 <DIV>-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"mov&nbsp;&nbsp;&nbsp;&nbsp;%0,&nbsp;%2,&nb \
sp;asr&nbsp;#31\n\t"&nbsp;&nbsp;/*&nbsp;%0&nbsp;&nbsp;=&nbsp;(hi&nbsp;&gt;&gt;&nbsp;31)&nbsp;*/</DIV>
 <DIV>-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"add&nbsp;&nbsp;&nbsp;&nbsp;%0,&nbsp;%0,&nbsp;#0x8000\n\t"&nbsp;&nbsp;/*&nbsp;%0&nbsp;+=&nbsp;0x8000&nbsp;*/</DIV>
 <DIV>-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"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0&nbsp;|=&nbsp;%2&nbsp;&lt;&lt;&nbsp;16&nbsp;*/</DIV>
 <DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;"=r"(a),&nbsp;"=&amp;r"(t2),&nbsp;"=&amp;r"(t)</DIV>
 <DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;"r"(a),&nbsp;"r"(b)&nbsp;);</DIV>
 <DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;a;</DIV>
<DIV></DIV>
<DIV>Regards,</DIV>
<DIV>mpsuzuki</DIV>
<DIV></DIV>
<DIV></DIV>
<DIV>On&nbsp;Sat,&nbsp;15&nbsp;Jan&nbsp;2011&nbsp;19:54:11&nbsp;+0900</DIV>
<DIV>suzuki&nbsp;toshiya&nbsp;&lt;mpsuzuki@hiroshima-u.ac.jp&gt;&nbsp;wrote:</DIV>
<DIV></DIV>
<DIV>&gt;Dear&nbsp;Johnson,</DIV>
<DIV>&gt;</DIV>
<DIV>&gt;I&nbsp;will&nbsp;take&nbsp;a&nbsp;look,&nbsp;but&nbsp;I&nbsp;don't&nbsp;have&nbsp;ARMv4&nbsp;machine&nbsp;to&nbsp;check</DIV>
 <DIV>&gt;the&nbsp;assembly&nbsp;code.&nbsp;Could&nbsp;you&nbsp;help&nbsp;me&nbsp;to&nbsp;check&nbsp;the&nbsp;revised</DIV>
 <DIV>&gt;version&nbsp;will&nbsp;work&nbsp;or&nbsp;not?&nbsp;The&nbsp;easiest/simplest&nbsp;fix&nbsp;would&nbsp;be</DIV>
 <DIV>&gt;disabling&nbsp;the&nbsp;assembly&nbsp;code&nbsp;for&nbsp;smaller&nbsp;versions&nbsp;of&nbsp;ARM</DIV>
 <DIV>&gt;architecture,&nbsp;but&nbsp;it&nbsp;won't&nbsp;be&nbsp;what&nbsp;you&nbsp;want...</DIV>
 <DIV>&gt;</DIV>
<DIV>&gt;Regards,</DIV>
<DIV>&gt;mpsuzuki</DIV>
<DIV>&gt;</DIV>
<DIV>&gt;Werner&nbsp;LEMBERG&nbsp;wrote:</DIV>
<DIV>&gt;&gt;&nbsp;ARM&nbsp;developers,&nbsp;please&nbsp;comment&nbsp;and&nbsp;help&nbsp;if&nbsp;possible!</DIV>
 <DIV></DIV></FONT></DIV></BODY></HTML>



_______________________________________________
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic