• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
gcc failure with i386 asm
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gcc failure with i386 asm


  • Subject: gcc failure with i386 asm
  • From: Mark Coniglio <email@hidden>
  • Date: Sun, 22 Jan 2006 22:42:24 -0500

Hi,

The following x86 asm code is causing gcc to fail with

Command: /user/bin/gcc-4.0 failed with exit code 1

when compiling the i386 version.

Now, if I comment out all label references (i.e., process_row and process_col in the code below, and the jumps to these addresses) then it compiles OK.

Does anyone know how I can solve this?

Is it something to do with my MMX instructions?

Best Wishes,
Mark

	asm {
		; push registers
		push		ebx

		; load up the pointers
		mov			ebx, src1		; -> src 1

movd mm1, alphaValue ; set low dword of mm1 to color
psllq mm1, 32 ; shift into high dword
movd mm2, alphaValue ; set low dword of mm2 to color
por mm1, mm2 ; color now in low and high double words


process_row:
mov col, width ; load counter with width


process_col:
movq mm2, [ebx] ; get byte from memory
por mm2, mm1 ; or with the fix alpha value
movq [ebx], mm2 ; store result
add ebx, 8 ; increment src1 ptr


		; increment row and repeat if not at end of row

		sub			col, 2			; decrement row
		ja			process_col

; increment with stride to next row
add ebx, stride ; skip to next row


		; increment col and repeat if not at bottom of image
		sub			row, 1			; decrement row
		ja			process_row

		; pop registers
		pop			ebx
	}


-- ===================================================================== Mark Coniglio, Artistic Co-Director | email@hidden Troika Ranch Dance Theater | http://www.troikaranch.org ===================================================================== _______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: gcc failure with i386 asm
      • From: Jonas Maebe <email@hidden>
  • Prev by Date: Re: Nav Services focus...
  • Next by Date: Re: Compare files?
  • Previous by thread: Call Java from Applescript using Xcode 2.2.1
  • Next by thread: Re: gcc failure with i386 asm
  • Index(es):
    • Date
    • Thread