Recent

Author Topic: BGRABitmap Error: Asm: [movq mem??,reg64] invalid  (Read 3034 times)

abtaylr

  • Full Member
  • ***
  • Posts: 104
BGRABitmap Error: Asm: [movq mem??,reg64] invalid
« on: June 14, 2016, 08:12:40 pm »
I am having difficulty with BGRABitmap.  I downloaded the latest version 8.9.2 after opening in Package -> Open Package File, I attempt to compile but I have received numerous errors:

bgradefaultbitmap.pas(2821,3) Error: Asm: [movq mem??,reg64] invalid combination of opcode and operands

I haven't found the offending asm code.  I wonder if the problem might be a compiler flag setting -- e.g. AT&T vs. Intel.

abtaylr

  • Full Member
  • ***
  • Posts: 104
Re: BGRABitmap Error: Asm: [movq mem??,reg64] invalid
« Reply #1 on: June 14, 2016, 08:25:57 pm »
The errors are all within the file BGRAdefaultbitmap.pas .  There are about 25 of them.

procedure TBGRADefaultBitmap.FillQuadLinearColor(pt1, pt2, pt3, pt4: TPointF;
  c1, c2, c3, c4: TBGRAPixel);
. . . .
  FillTriangleLinearColor(pt1,pt2,center, c1,c2,centerColor);
  FillTriangleLinearColor(pt2,pt3,center, c2,c3,centerColor);
  FillTriangleLinearColor(pt3,pt4,center, c3,c4,centerColor);
  FillTriangleLinearColor(pt4,pt1,center, c4,c1,centerColor);
end;

procedure TBGRADefaultBitmap.FillQuadLinearMappingLightness(pt1, pt2, pt3,
  pt4: TPointF; texture: IBGRAScanner; tex1, tex2, tex3, tex4: TPointF; light1,
  light2, light3, light4: word; TextureInterpolation: Boolean);
. . . .
  FillTriangleLinearMappingLightness(pt1,pt2,center, texture,tex1,tex2,centerTex, light1,light2,centerLight, TextureInterpolation);
  FillTriangleLinearMappingLightness(pt2,pt3,center, texture,tex2,tex3,centerTex, light2,light3,centerLight, TextureInterpolation);
  FillTriangleLinearMappingLightness(pt3,pt4,center, texture,tex3,tex4,centerTex, light3,light4,centerLight, TextureInterpolation);
  FillTriangleLinearMappingLightness(pt4,pt1,center, texture,tex4,tex1,centerTex, light4,light1,centerLight, TextureInterpolation);
end;

procedure BGRAGradientFill(bmp: TBGRACustomBitmap; x, y, x2, y2: integer;
  c1, c2: TBGRAPixel; gtype: TGradientType; o1, o2: TPointF; mode: TDrawMode;
  gammaColorCorrection: boolean = True; Sinus: Boolean=False);
begin
  bmp.GradientFill(x,y,x2,y2,c1,c2,gtype,o1,o2,mode,gammaColorCorrection,sinus);
end;

I am running Kubuntu 16.04 64bit

abtaylr

  • Full Member
  • ***
  • Posts: 104
Re: BGRABitmap Error: Asm: [movq mem??,reg64] invalid
« Reply #2 on: June 14, 2016, 08:41:05 pm »
While tracing back through the code, I came upon BGRAPoligonAliased.pas which shows Intel code.

abtaylr

  • Full Member
  • ***
  • Posts: 104
Re: BGRABitmap Error: Asm: [movq mem??,reg64] invalid
« Reply #3 on: June 14, 2016, 09:15:50 pm »
When I have encountered Intel code previously in Lazarus, I have had to convert over to AT&T to get passed the problem.  I have looked at the compiler flags, but don't see one dealing with AT&T vs. Intel. I noticed that this version has only been released earlier today. There might be a problem in the release -- small error somewhere, etc. Hopefully, the developer can take a look.

Cyrax

  • Hero Member
  • *****
  • Posts: 838
Re: BGRABitmap Error: Asm: [movq mem??,reg64] invalid
« Reply #4 on: June 15, 2016, 12:39:56 pm »
In problematic unit, add {$asmmode intel} after {$mode <x>}{$H+} switches.

 

TinyPortal © 2005-2018