freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ft-devel] FT_New_Memory_Face: get error code 2 on arm


From: duhuanpeng
Subject: [ft-devel] FT_New_Memory_Face: get error code 2 on arm
Date: Tue, 13 Mar 2018 19:45:35 +0800

Hi,
My test program 
  https://paste.ubuntu.com/p/vvwW5bfmrF/
runs normal on my pc and my cortex-r4 board.

But I get an error code (2) on my M0 board.
The compile log is:
  https://paste.ubuntu.com/p/kKQs7FhVVV/

output:
  >buffer:
  >FT_Init_FreeType: 0
  >FT_New_Memory_Face: 2
  > num_glyphs: 0
  >face sizeds: 0
  >FT_Load_Char: error=23
  >M0: [1]
  >M1: [1]
  >Hello World.

By the way, the assembly code is broken with thumb2:
  >  static __inline FT_Int32
  >  FT_MulFix_arm( FT_Int32  a,
  >                 FT_Int32  b )
  >  {
  >    FT_Int32  t, t2;
  >
  >
  >    __asm
  >    {
  >      smull t2, t,  b,  a           /* (lo=t2,hi=t) = a*b */
  >      mov   a,  t,  asr #31         /* a   = (hi >> 31) */
  >      add   a,  a,  #0x8000         /* a  += 0x8000 */
  >      adds  t2, t2, a               /* t2 += a */
  >      adc   t,  t,  #0              /* t  += carry */
  >      mov   a,  t2, lsr #16         /* a   = t2 >> 16 */
  >      orr   a,  a,  t,  lsl #16     /* a  |= t << 16 */
  >    }
  >    return a;
  >  }

For workaround I disabled
/* #define FT_CONFIG_OPTION_NO_ASSEMBLER */

Regards,
duhuanpeng





reply via email to

[Prev in Thread] Current Thread [Next in Thread]