Raspbian gcc does not know '.intel_syntax'?man gcc not workinggcc --as-needed linker flag not workingError compiling gcc on Raspberry Pi (Raspbian): make: *** [bootstrap] errorgcc not picking up kernel header filesInstall GCC 5.1 on Raspberry Pi 2 with RaspbianHow does gcc find the following header file?cannot compile latest gccgcc does not apply partial relroConda gcc/g++ did not replace system (linux) gccWhy does my build of gcc not support shared libraries
Are there foods that astronauts are explicitly never allowed to eat?
Three phase systems - are there any single phase devices that are connected between two phases instead of between one phase and neutral?
Why didn't Balak request Bilam to bless his own people?
Why is the forgetful functor representable?
Why is there an extra "t" in Lemmatization?
Aren't all schwa sounds literally /ø/?
Time war story - soldier name lengthens as he travels further from the battle front
How does the Gameboy's memory bank switching work?
Does the Bracer of Flying Daggers really let a thief make 4 attacks per round?
Would using carbon dioxide as fuel work to reduce the greenhouse effect?
Ethiopian Airlines tickets seem to always have the same price regardless of the proximity of the date?
Book in which the "mountain" in the distance was a hole in the flat world
Why didn't NASA launch communications relay satellites for the Apollo missions?
Why does airflow separate from the wing during stall?
Brute-force the switchboard
What is the origin of "Wonder begets wisdom?"
Can a creature sustain itself by eating its own severed body parts?
ESTA Travel not Authorized. Accepted twice before!
Why are flying carpets banned while flying brooms are not?
What does a Nintendo Game Boy do when turned on without a game cartridge inserted?
A bicolour masyu
Is it ethical to tell my teaching assistant that I like him?
Inside Out and Back to Front
Linux ext4 restore file and directory access rights after bad backup/restore
Raspbian gcc does not know '.intel_syntax'?
man gcc not workinggcc --as-needed linker flag not workingError compiling gcc on Raspberry Pi (Raspbian): make: *** [bootstrap] errorgcc not picking up kernel header filesInstall GCC 5.1 on Raspberry Pi 2 with RaspbianHow does gcc find the following header file?cannot compile latest gccgcc does not apply partial relroConda gcc/g++ did not replace system (linux) gccWhy does my build of gcc not support shared libraries
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I tried to execute:
gcc -o main main.c squrt.S -lm -no-pie
This worked on a different computer, but this time it did not know a single instruction:
squrt.S: Assembler messages:
squrt.S:7: Error: unknown pseudo-op: `.intel_syntax'
squrt.S:12: Error: junk at end of line, first unrecognized character is `#'
squrt.S:17: Error: bad instruction `movq rax,xmm0#Bits from xmm0 to rax'
squrt.S:18: Error: bad instruction `shl rax,1'
squrt.S:19: Error: bad instruction `shr rax,53#Exponent of the argument'
squrt.S:20: Error: ARM register expected -- `cmp rax,2047#checks if x is real'
squrt.S:21: Error: bad instruction `je end'
squrt.S:22: Error: ARM register expected -- `mov rcx,1#sgn(x)'
squrt.S:23: Error: ARM register expected -- `mov rax,0'
squrt.S:24: Error: bad instruction `cvtsi2sd xmm1,rax'
squrt.S:25: Error: bad instruction `comisd xmm0,xmm1#vergleicht die double xmm0,xmm1 und setzt das Statusregister entsprechend'
squrt.S:26: Error: bad instruction `jae notNegative#Sprung wenn double x in xmm0>=0.0'
squrt.S:27: Error: ARM register expected -- `mov rcx,-1#x<0,deswegen sgn(x)=-1'
squrt.S:28: Error: bad instruction `cvtsi2sd xmm1,rcx'
squrt.S:29: Error: bad instruction `mulsd xmm0,xmm1'
squrt.S:31: Error: bad instruction `movsd xmm2,[power]'
squrt.S:32: Error: bad instruction `comisd xmm0,xmm2'
squrt.S:33: Error: bad instruction `jbe nichtriesig'
squrt.S:34: Error: bad instruction `call ln#|x|>2^28'
squrt.S:35: Error: bad instruction `movsd xmm1,[ln2]'
squrt.S:36: Error: bad instruction `addsd xmm0,xmm1'
squrt.S:37: Error: bad instruction `cvtsi2sd xmm1,rcx'
squrt.S:38: Error: bad instruction `mulsd xmm0,xmm1'
squrt.S:39: Error: bad instruction `ret #arsinh(x):=sgn(x)(ln(x)+ln(2))'
squrt.S:41: Error: bad instruction `movsd xmm1,xmm0'
squrt.S:42: Error: bad instruction `mulsd xmm0,xmm0'
squrt.S:43: Error: ARM register expected -- `mov rax,1'
squrt.S:44: Error: bad instruction `cvtsi2sd xmm2,rax'
squrt.S:45: Error: bad instruction `addsd xmm0,xmm2'
squrt.S:46: Error: bad instruction `call .Lsqrt'
squrt.S:47: Error: bad instruction `addsd xmm0,xmm1'
squrt.S:48: Error: bad instruction `call ln'
squrt.S:49: Error: bad instruction `cvtsi2sd xmm1,rcx'
squrt.S:50: Error: bad instruction `mulsd xmm0,xmm1'
squrt.S:52: Error: bad instruction `ret'
squrt.S:65: Error: bad instruction `movq rdx,xmm0'
squrt.S:66: Error: bad instruction `shr rdx,52#Mantisse wegschieben'
squrt.S:68: Error: ARM register expected -- `sub rdx,1022#e+1'
squrt.S:70: Error: bad instruction `movq rax,xmm0'
squrt.S:71: Error: bad instruction `shl rax,12#setze Vorzeichen'
squrt.S:72: Error: bad instruction `shr rax,12#und Exponenten auf 0'
squrt.S:73: Error: ARM register expected -- `mov rdi,1022'
squrt.S:74: Error: bad instruction `shl rdi,52#verschiebe(-1+1023)in die oberen 12 bit von rdi(oder genauer gesagt 11 Bit,das 12. wird nicht verändert)'
squrt.S:75: Error: ARM register expected -- `add rax,rdi#neuer Exponent mit alter Mantisse m durch Addition'
squrt.S:76: Error: bad instruction `movq xmm0,rax#enthält m*0,5'
squrt.S:77: Error: ARM register expected -- `mov rax,1'
squrt.S:78: Error: bad instruction `cvtsi2sd xmm3,rax#xmm3=1'
squrt.S:79: Error: bad instruction `movsd xmm4,xmm3'
squrt.S:80: Error: bad instruction `addsd xmm4,xmm3#2'
squrt.S:81: Error: bad instruction `movsd xmm1,xmm3#1=2k+1,da k am Anfang 0 ist'
squrt.S:82: Error: bad instruction `movsd xmm5,xmm0#x'
squrt.S:83: Error: bad instruction `movsd xmm6,xmm0#x'
squrt.S:84: Error: bad instruction `subsd xmm5,xmm3#x-1'
squrt.S:85: Error: bad instruction `addsd xmm6,xmm3#x+1'
squrt.S:86: Error: bad instruction `divsd xmm5,xmm6#((x-1)/(x+1))^(2k+1),wobei k noch 0'
squrt.S:87: Error: bad instruction `movsd xmm7,xmm5'
squrt.S:88: Error: bad instruction `mulsd xmm7,xmm7#(x-1)/(x+1)^2'
squrt.S:89: Error: ARM register expected -- `mov rax,0'
squrt.S:90: Error: bad instruction `movq xmm0,rax#0'
squrt.S:91: Error: ARM register expected -- `mov rsi,5'
squrt.S:93: Error: bad instruction `movsd xmm2,xmm4#2'
squrt.S:94: Error: bad instruction `divsd xmm2,xmm1#2/(2k+1)'
squrt.S:95: Error: bad instruction `mulsd xmm2,xmm5#2/(2k+1))*(((x-1)/(x+1))^(2k+1))'
squrt.S:96: Error: bad instruction `addsd xmm0,xmm2'
squrt.S:97: Error: bad instruction `addsd xmm1,xmm4'
squrt.S:98: Error: bad instruction `mulsd xmm5,xmm7'
squrt.S:99: Error: bad instruction `dec rsi'
squrt.S:100: Error: bad instruction `jg lnLoop'
squrt.S:102: Error: bad instruction `movsd xmm1,[ln2]'
squrt.S:103: Error: bad instruction `cvtsi2sd xmm2,rdx'
squrt.S:104: Error: bad instruction `mulsd xmm1,xmm2'
squrt.S:105: Error: bad instruction `addsd xmm0,xmm1#(ln(x)+(exponent+1)*ln(2))'
squrt.S:106: Error: bad instruction `ret'
squrt.S:109: Error: bad instruction `movsd xmm13,xmm0'
squrt.S:110: Error: bad instruction `movq rax,xmm0'
squrt.S:111: Error: bad instruction `shl rax,1'
squrt.S:112: Error: bad instruction `shr rax,53'
squrt.S:113: Error: ARM register expected -- `sub rax,1023'
squrt.S:114: Error: ARM register expected -- `add rax,1'
squrt.S:115: Error: bad instruction `sar rax,1'
squrt.S:116: Error: ARM register expected -- `add rax,1023'
squrt.S:117: Error: bad instruction `shl rax,52'
squrt.S:118: Error: bad instruction `movq xmm0,rax'
squrt.S:119: Error: bad instruction `movsd xmm15,xmm0'
squrt.S:120: Error: bad instruction `movsd xmm0,xmm13'
squrt.S:122: Error: ARM register expected -- `mov rax,2'
squrt.S:123: Error: bad instruction `cvtsi2sd xmm14,rax#2'
squrt.S:124: Error: ARM register expected -- `mov rax,8#Anzahl Wiederholungen-1'
squrt.S:126: Error: bad instruction `movsd xmm13,xmm0'
squrt.S:127: Error: bad instruction `divsd xmm13,xmm15'
squrt.S:128: Error: bad instruction `addsd xmm13,xmm15'
squrt.S:129: Error: bad instruction `divsd xmm13,xmm14'
squrt.S:130: Error: bad instruction `movsd xmm15,xmm13'
squrt.S:131: Error: bad instruction `dec rax'
squrt.S:132: Error: bad instruction `jle sqrtEnd'
squrt.S:133: Error: bad instruction `jmp sqrtLoop'
squrt.S:135: Error: bad instruction `movsd xmm0,xmm13'
squrt.S:136: Error: bad instruction `ret'
make: *** [Makefile:2: main] Fehler 1
Is there some package I have to install?
linux gcc assembly
New contributor
add a comment |
I tried to execute:
gcc -o main main.c squrt.S -lm -no-pie
This worked on a different computer, but this time it did not know a single instruction:
squrt.S: Assembler messages:
squrt.S:7: Error: unknown pseudo-op: `.intel_syntax'
squrt.S:12: Error: junk at end of line, first unrecognized character is `#'
squrt.S:17: Error: bad instruction `movq rax,xmm0#Bits from xmm0 to rax'
squrt.S:18: Error: bad instruction `shl rax,1'
squrt.S:19: Error: bad instruction `shr rax,53#Exponent of the argument'
squrt.S:20: Error: ARM register expected -- `cmp rax,2047#checks if x is real'
squrt.S:21: Error: bad instruction `je end'
squrt.S:22: Error: ARM register expected -- `mov rcx,1#sgn(x)'
squrt.S:23: Error: ARM register expected -- `mov rax,0'
squrt.S:24: Error: bad instruction `cvtsi2sd xmm1,rax'
squrt.S:25: Error: bad instruction `comisd xmm0,xmm1#vergleicht die double xmm0,xmm1 und setzt das Statusregister entsprechend'
squrt.S:26: Error: bad instruction `jae notNegative#Sprung wenn double x in xmm0>=0.0'
squrt.S:27: Error: ARM register expected -- `mov rcx,-1#x<0,deswegen sgn(x)=-1'
squrt.S:28: Error: bad instruction `cvtsi2sd xmm1,rcx'
squrt.S:29: Error: bad instruction `mulsd xmm0,xmm1'
squrt.S:31: Error: bad instruction `movsd xmm2,[power]'
squrt.S:32: Error: bad instruction `comisd xmm0,xmm2'
squrt.S:33: Error: bad instruction `jbe nichtriesig'
squrt.S:34: Error: bad instruction `call ln#|x|>2^28'
squrt.S:35: Error: bad instruction `movsd xmm1,[ln2]'
squrt.S:36: Error: bad instruction `addsd xmm0,xmm1'
squrt.S:37: Error: bad instruction `cvtsi2sd xmm1,rcx'
squrt.S:38: Error: bad instruction `mulsd xmm0,xmm1'
squrt.S:39: Error: bad instruction `ret #arsinh(x):=sgn(x)(ln(x)+ln(2))'
squrt.S:41: Error: bad instruction `movsd xmm1,xmm0'
squrt.S:42: Error: bad instruction `mulsd xmm0,xmm0'
squrt.S:43: Error: ARM register expected -- `mov rax,1'
squrt.S:44: Error: bad instruction `cvtsi2sd xmm2,rax'
squrt.S:45: Error: bad instruction `addsd xmm0,xmm2'
squrt.S:46: Error: bad instruction `call .Lsqrt'
squrt.S:47: Error: bad instruction `addsd xmm0,xmm1'
squrt.S:48: Error: bad instruction `call ln'
squrt.S:49: Error: bad instruction `cvtsi2sd xmm1,rcx'
squrt.S:50: Error: bad instruction `mulsd xmm0,xmm1'
squrt.S:52: Error: bad instruction `ret'
squrt.S:65: Error: bad instruction `movq rdx,xmm0'
squrt.S:66: Error: bad instruction `shr rdx,52#Mantisse wegschieben'
squrt.S:68: Error: ARM register expected -- `sub rdx,1022#e+1'
squrt.S:70: Error: bad instruction `movq rax,xmm0'
squrt.S:71: Error: bad instruction `shl rax,12#setze Vorzeichen'
squrt.S:72: Error: bad instruction `shr rax,12#und Exponenten auf 0'
squrt.S:73: Error: ARM register expected -- `mov rdi,1022'
squrt.S:74: Error: bad instruction `shl rdi,52#verschiebe(-1+1023)in die oberen 12 bit von rdi(oder genauer gesagt 11 Bit,das 12. wird nicht verändert)'
squrt.S:75: Error: ARM register expected -- `add rax,rdi#neuer Exponent mit alter Mantisse m durch Addition'
squrt.S:76: Error: bad instruction `movq xmm0,rax#enthält m*0,5'
squrt.S:77: Error: ARM register expected -- `mov rax,1'
squrt.S:78: Error: bad instruction `cvtsi2sd xmm3,rax#xmm3=1'
squrt.S:79: Error: bad instruction `movsd xmm4,xmm3'
squrt.S:80: Error: bad instruction `addsd xmm4,xmm3#2'
squrt.S:81: Error: bad instruction `movsd xmm1,xmm3#1=2k+1,da k am Anfang 0 ist'
squrt.S:82: Error: bad instruction `movsd xmm5,xmm0#x'
squrt.S:83: Error: bad instruction `movsd xmm6,xmm0#x'
squrt.S:84: Error: bad instruction `subsd xmm5,xmm3#x-1'
squrt.S:85: Error: bad instruction `addsd xmm6,xmm3#x+1'
squrt.S:86: Error: bad instruction `divsd xmm5,xmm6#((x-1)/(x+1))^(2k+1),wobei k noch 0'
squrt.S:87: Error: bad instruction `movsd xmm7,xmm5'
squrt.S:88: Error: bad instruction `mulsd xmm7,xmm7#(x-1)/(x+1)^2'
squrt.S:89: Error: ARM register expected -- `mov rax,0'
squrt.S:90: Error: bad instruction `movq xmm0,rax#0'
squrt.S:91: Error: ARM register expected -- `mov rsi,5'
squrt.S:93: Error: bad instruction `movsd xmm2,xmm4#2'
squrt.S:94: Error: bad instruction `divsd xmm2,xmm1#2/(2k+1)'
squrt.S:95: Error: bad instruction `mulsd xmm2,xmm5#2/(2k+1))*(((x-1)/(x+1))^(2k+1))'
squrt.S:96: Error: bad instruction `addsd xmm0,xmm2'
squrt.S:97: Error: bad instruction `addsd xmm1,xmm4'
squrt.S:98: Error: bad instruction `mulsd xmm5,xmm7'
squrt.S:99: Error: bad instruction `dec rsi'
squrt.S:100: Error: bad instruction `jg lnLoop'
squrt.S:102: Error: bad instruction `movsd xmm1,[ln2]'
squrt.S:103: Error: bad instruction `cvtsi2sd xmm2,rdx'
squrt.S:104: Error: bad instruction `mulsd xmm1,xmm2'
squrt.S:105: Error: bad instruction `addsd xmm0,xmm1#(ln(x)+(exponent+1)*ln(2))'
squrt.S:106: Error: bad instruction `ret'
squrt.S:109: Error: bad instruction `movsd xmm13,xmm0'
squrt.S:110: Error: bad instruction `movq rax,xmm0'
squrt.S:111: Error: bad instruction `shl rax,1'
squrt.S:112: Error: bad instruction `shr rax,53'
squrt.S:113: Error: ARM register expected -- `sub rax,1023'
squrt.S:114: Error: ARM register expected -- `add rax,1'
squrt.S:115: Error: bad instruction `sar rax,1'
squrt.S:116: Error: ARM register expected -- `add rax,1023'
squrt.S:117: Error: bad instruction `shl rax,52'
squrt.S:118: Error: bad instruction `movq xmm0,rax'
squrt.S:119: Error: bad instruction `movsd xmm15,xmm0'
squrt.S:120: Error: bad instruction `movsd xmm0,xmm13'
squrt.S:122: Error: ARM register expected -- `mov rax,2'
squrt.S:123: Error: bad instruction `cvtsi2sd xmm14,rax#2'
squrt.S:124: Error: ARM register expected -- `mov rax,8#Anzahl Wiederholungen-1'
squrt.S:126: Error: bad instruction `movsd xmm13,xmm0'
squrt.S:127: Error: bad instruction `divsd xmm13,xmm15'
squrt.S:128: Error: bad instruction `addsd xmm13,xmm15'
squrt.S:129: Error: bad instruction `divsd xmm13,xmm14'
squrt.S:130: Error: bad instruction `movsd xmm15,xmm13'
squrt.S:131: Error: bad instruction `dec rax'
squrt.S:132: Error: bad instruction `jle sqrtEnd'
squrt.S:133: Error: bad instruction `jmp sqrtLoop'
squrt.S:135: Error: bad instruction `movsd xmm0,xmm13'
squrt.S:136: Error: bad instruction `ret'
make: *** [Makefile:2: main] Fehler 1
Is there some package I have to install?
linux gcc assembly
New contributor
What CPU do you have in your pi?
– ctrl-alt-delor
6 hours ago
add a comment |
I tried to execute:
gcc -o main main.c squrt.S -lm -no-pie
This worked on a different computer, but this time it did not know a single instruction:
squrt.S: Assembler messages:
squrt.S:7: Error: unknown pseudo-op: `.intel_syntax'
squrt.S:12: Error: junk at end of line, first unrecognized character is `#'
squrt.S:17: Error: bad instruction `movq rax,xmm0#Bits from xmm0 to rax'
squrt.S:18: Error: bad instruction `shl rax,1'
squrt.S:19: Error: bad instruction `shr rax,53#Exponent of the argument'
squrt.S:20: Error: ARM register expected -- `cmp rax,2047#checks if x is real'
squrt.S:21: Error: bad instruction `je end'
squrt.S:22: Error: ARM register expected -- `mov rcx,1#sgn(x)'
squrt.S:23: Error: ARM register expected -- `mov rax,0'
squrt.S:24: Error: bad instruction `cvtsi2sd xmm1,rax'
squrt.S:25: Error: bad instruction `comisd xmm0,xmm1#vergleicht die double xmm0,xmm1 und setzt das Statusregister entsprechend'
squrt.S:26: Error: bad instruction `jae notNegative#Sprung wenn double x in xmm0>=0.0'
squrt.S:27: Error: ARM register expected -- `mov rcx,-1#x<0,deswegen sgn(x)=-1'
squrt.S:28: Error: bad instruction `cvtsi2sd xmm1,rcx'
squrt.S:29: Error: bad instruction `mulsd xmm0,xmm1'
squrt.S:31: Error: bad instruction `movsd xmm2,[power]'
squrt.S:32: Error: bad instruction `comisd xmm0,xmm2'
squrt.S:33: Error: bad instruction `jbe nichtriesig'
squrt.S:34: Error: bad instruction `call ln#|x|>2^28'
squrt.S:35: Error: bad instruction `movsd xmm1,[ln2]'
squrt.S:36: Error: bad instruction `addsd xmm0,xmm1'
squrt.S:37: Error: bad instruction `cvtsi2sd xmm1,rcx'
squrt.S:38: Error: bad instruction `mulsd xmm0,xmm1'
squrt.S:39: Error: bad instruction `ret #arsinh(x):=sgn(x)(ln(x)+ln(2))'
squrt.S:41: Error: bad instruction `movsd xmm1,xmm0'
squrt.S:42: Error: bad instruction `mulsd xmm0,xmm0'
squrt.S:43: Error: ARM register expected -- `mov rax,1'
squrt.S:44: Error: bad instruction `cvtsi2sd xmm2,rax'
squrt.S:45: Error: bad instruction `addsd xmm0,xmm2'
squrt.S:46: Error: bad instruction `call .Lsqrt'
squrt.S:47: Error: bad instruction `addsd xmm0,xmm1'
squrt.S:48: Error: bad instruction `call ln'
squrt.S:49: Error: bad instruction `cvtsi2sd xmm1,rcx'
squrt.S:50: Error: bad instruction `mulsd xmm0,xmm1'
squrt.S:52: Error: bad instruction `ret'
squrt.S:65: Error: bad instruction `movq rdx,xmm0'
squrt.S:66: Error: bad instruction `shr rdx,52#Mantisse wegschieben'
squrt.S:68: Error: ARM register expected -- `sub rdx,1022#e+1'
squrt.S:70: Error: bad instruction `movq rax,xmm0'
squrt.S:71: Error: bad instruction `shl rax,12#setze Vorzeichen'
squrt.S:72: Error: bad instruction `shr rax,12#und Exponenten auf 0'
squrt.S:73: Error: ARM register expected -- `mov rdi,1022'
squrt.S:74: Error: bad instruction `shl rdi,52#verschiebe(-1+1023)in die oberen 12 bit von rdi(oder genauer gesagt 11 Bit,das 12. wird nicht verändert)'
squrt.S:75: Error: ARM register expected -- `add rax,rdi#neuer Exponent mit alter Mantisse m durch Addition'
squrt.S:76: Error: bad instruction `movq xmm0,rax#enthält m*0,5'
squrt.S:77: Error: ARM register expected -- `mov rax,1'
squrt.S:78: Error: bad instruction `cvtsi2sd xmm3,rax#xmm3=1'
squrt.S:79: Error: bad instruction `movsd xmm4,xmm3'
squrt.S:80: Error: bad instruction `addsd xmm4,xmm3#2'
squrt.S:81: Error: bad instruction `movsd xmm1,xmm3#1=2k+1,da k am Anfang 0 ist'
squrt.S:82: Error: bad instruction `movsd xmm5,xmm0#x'
squrt.S:83: Error: bad instruction `movsd xmm6,xmm0#x'
squrt.S:84: Error: bad instruction `subsd xmm5,xmm3#x-1'
squrt.S:85: Error: bad instruction `addsd xmm6,xmm3#x+1'
squrt.S:86: Error: bad instruction `divsd xmm5,xmm6#((x-1)/(x+1))^(2k+1),wobei k noch 0'
squrt.S:87: Error: bad instruction `movsd xmm7,xmm5'
squrt.S:88: Error: bad instruction `mulsd xmm7,xmm7#(x-1)/(x+1)^2'
squrt.S:89: Error: ARM register expected -- `mov rax,0'
squrt.S:90: Error: bad instruction `movq xmm0,rax#0'
squrt.S:91: Error: ARM register expected -- `mov rsi,5'
squrt.S:93: Error: bad instruction `movsd xmm2,xmm4#2'
squrt.S:94: Error: bad instruction `divsd xmm2,xmm1#2/(2k+1)'
squrt.S:95: Error: bad instruction `mulsd xmm2,xmm5#2/(2k+1))*(((x-1)/(x+1))^(2k+1))'
squrt.S:96: Error: bad instruction `addsd xmm0,xmm2'
squrt.S:97: Error: bad instruction `addsd xmm1,xmm4'
squrt.S:98: Error: bad instruction `mulsd xmm5,xmm7'
squrt.S:99: Error: bad instruction `dec rsi'
squrt.S:100: Error: bad instruction `jg lnLoop'
squrt.S:102: Error: bad instruction `movsd xmm1,[ln2]'
squrt.S:103: Error: bad instruction `cvtsi2sd xmm2,rdx'
squrt.S:104: Error: bad instruction `mulsd xmm1,xmm2'
squrt.S:105: Error: bad instruction `addsd xmm0,xmm1#(ln(x)+(exponent+1)*ln(2))'
squrt.S:106: Error: bad instruction `ret'
squrt.S:109: Error: bad instruction `movsd xmm13,xmm0'
squrt.S:110: Error: bad instruction `movq rax,xmm0'
squrt.S:111: Error: bad instruction `shl rax,1'
squrt.S:112: Error: bad instruction `shr rax,53'
squrt.S:113: Error: ARM register expected -- `sub rax,1023'
squrt.S:114: Error: ARM register expected -- `add rax,1'
squrt.S:115: Error: bad instruction `sar rax,1'
squrt.S:116: Error: ARM register expected -- `add rax,1023'
squrt.S:117: Error: bad instruction `shl rax,52'
squrt.S:118: Error: bad instruction `movq xmm0,rax'
squrt.S:119: Error: bad instruction `movsd xmm15,xmm0'
squrt.S:120: Error: bad instruction `movsd xmm0,xmm13'
squrt.S:122: Error: ARM register expected -- `mov rax,2'
squrt.S:123: Error: bad instruction `cvtsi2sd xmm14,rax#2'
squrt.S:124: Error: ARM register expected -- `mov rax,8#Anzahl Wiederholungen-1'
squrt.S:126: Error: bad instruction `movsd xmm13,xmm0'
squrt.S:127: Error: bad instruction `divsd xmm13,xmm15'
squrt.S:128: Error: bad instruction `addsd xmm13,xmm15'
squrt.S:129: Error: bad instruction `divsd xmm13,xmm14'
squrt.S:130: Error: bad instruction `movsd xmm15,xmm13'
squrt.S:131: Error: bad instruction `dec rax'
squrt.S:132: Error: bad instruction `jle sqrtEnd'
squrt.S:133: Error: bad instruction `jmp sqrtLoop'
squrt.S:135: Error: bad instruction `movsd xmm0,xmm13'
squrt.S:136: Error: bad instruction `ret'
make: *** [Makefile:2: main] Fehler 1
Is there some package I have to install?
linux gcc assembly
New contributor
I tried to execute:
gcc -o main main.c squrt.S -lm -no-pie
This worked on a different computer, but this time it did not know a single instruction:
squrt.S: Assembler messages:
squrt.S:7: Error: unknown pseudo-op: `.intel_syntax'
squrt.S:12: Error: junk at end of line, first unrecognized character is `#'
squrt.S:17: Error: bad instruction `movq rax,xmm0#Bits from xmm0 to rax'
squrt.S:18: Error: bad instruction `shl rax,1'
squrt.S:19: Error: bad instruction `shr rax,53#Exponent of the argument'
squrt.S:20: Error: ARM register expected -- `cmp rax,2047#checks if x is real'
squrt.S:21: Error: bad instruction `je end'
squrt.S:22: Error: ARM register expected -- `mov rcx,1#sgn(x)'
squrt.S:23: Error: ARM register expected -- `mov rax,0'
squrt.S:24: Error: bad instruction `cvtsi2sd xmm1,rax'
squrt.S:25: Error: bad instruction `comisd xmm0,xmm1#vergleicht die double xmm0,xmm1 und setzt das Statusregister entsprechend'
squrt.S:26: Error: bad instruction `jae notNegative#Sprung wenn double x in xmm0>=0.0'
squrt.S:27: Error: ARM register expected -- `mov rcx,-1#x<0,deswegen sgn(x)=-1'
squrt.S:28: Error: bad instruction `cvtsi2sd xmm1,rcx'
squrt.S:29: Error: bad instruction `mulsd xmm0,xmm1'
squrt.S:31: Error: bad instruction `movsd xmm2,[power]'
squrt.S:32: Error: bad instruction `comisd xmm0,xmm2'
squrt.S:33: Error: bad instruction `jbe nichtriesig'
squrt.S:34: Error: bad instruction `call ln#|x|>2^28'
squrt.S:35: Error: bad instruction `movsd xmm1,[ln2]'
squrt.S:36: Error: bad instruction `addsd xmm0,xmm1'
squrt.S:37: Error: bad instruction `cvtsi2sd xmm1,rcx'
squrt.S:38: Error: bad instruction `mulsd xmm0,xmm1'
squrt.S:39: Error: bad instruction `ret #arsinh(x):=sgn(x)(ln(x)+ln(2))'
squrt.S:41: Error: bad instruction `movsd xmm1,xmm0'
squrt.S:42: Error: bad instruction `mulsd xmm0,xmm0'
squrt.S:43: Error: ARM register expected -- `mov rax,1'
squrt.S:44: Error: bad instruction `cvtsi2sd xmm2,rax'
squrt.S:45: Error: bad instruction `addsd xmm0,xmm2'
squrt.S:46: Error: bad instruction `call .Lsqrt'
squrt.S:47: Error: bad instruction `addsd xmm0,xmm1'
squrt.S:48: Error: bad instruction `call ln'
squrt.S:49: Error: bad instruction `cvtsi2sd xmm1,rcx'
squrt.S:50: Error: bad instruction `mulsd xmm0,xmm1'
squrt.S:52: Error: bad instruction `ret'
squrt.S:65: Error: bad instruction `movq rdx,xmm0'
squrt.S:66: Error: bad instruction `shr rdx,52#Mantisse wegschieben'
squrt.S:68: Error: ARM register expected -- `sub rdx,1022#e+1'
squrt.S:70: Error: bad instruction `movq rax,xmm0'
squrt.S:71: Error: bad instruction `shl rax,12#setze Vorzeichen'
squrt.S:72: Error: bad instruction `shr rax,12#und Exponenten auf 0'
squrt.S:73: Error: ARM register expected -- `mov rdi,1022'
squrt.S:74: Error: bad instruction `shl rdi,52#verschiebe(-1+1023)in die oberen 12 bit von rdi(oder genauer gesagt 11 Bit,das 12. wird nicht verändert)'
squrt.S:75: Error: ARM register expected -- `add rax,rdi#neuer Exponent mit alter Mantisse m durch Addition'
squrt.S:76: Error: bad instruction `movq xmm0,rax#enthält m*0,5'
squrt.S:77: Error: ARM register expected -- `mov rax,1'
squrt.S:78: Error: bad instruction `cvtsi2sd xmm3,rax#xmm3=1'
squrt.S:79: Error: bad instruction `movsd xmm4,xmm3'
squrt.S:80: Error: bad instruction `addsd xmm4,xmm3#2'
squrt.S:81: Error: bad instruction `movsd xmm1,xmm3#1=2k+1,da k am Anfang 0 ist'
squrt.S:82: Error: bad instruction `movsd xmm5,xmm0#x'
squrt.S:83: Error: bad instruction `movsd xmm6,xmm0#x'
squrt.S:84: Error: bad instruction `subsd xmm5,xmm3#x-1'
squrt.S:85: Error: bad instruction `addsd xmm6,xmm3#x+1'
squrt.S:86: Error: bad instruction `divsd xmm5,xmm6#((x-1)/(x+1))^(2k+1),wobei k noch 0'
squrt.S:87: Error: bad instruction `movsd xmm7,xmm5'
squrt.S:88: Error: bad instruction `mulsd xmm7,xmm7#(x-1)/(x+1)^2'
squrt.S:89: Error: ARM register expected -- `mov rax,0'
squrt.S:90: Error: bad instruction `movq xmm0,rax#0'
squrt.S:91: Error: ARM register expected -- `mov rsi,5'
squrt.S:93: Error: bad instruction `movsd xmm2,xmm4#2'
squrt.S:94: Error: bad instruction `divsd xmm2,xmm1#2/(2k+1)'
squrt.S:95: Error: bad instruction `mulsd xmm2,xmm5#2/(2k+1))*(((x-1)/(x+1))^(2k+1))'
squrt.S:96: Error: bad instruction `addsd xmm0,xmm2'
squrt.S:97: Error: bad instruction `addsd xmm1,xmm4'
squrt.S:98: Error: bad instruction `mulsd xmm5,xmm7'
squrt.S:99: Error: bad instruction `dec rsi'
squrt.S:100: Error: bad instruction `jg lnLoop'
squrt.S:102: Error: bad instruction `movsd xmm1,[ln2]'
squrt.S:103: Error: bad instruction `cvtsi2sd xmm2,rdx'
squrt.S:104: Error: bad instruction `mulsd xmm1,xmm2'
squrt.S:105: Error: bad instruction `addsd xmm0,xmm1#(ln(x)+(exponent+1)*ln(2))'
squrt.S:106: Error: bad instruction `ret'
squrt.S:109: Error: bad instruction `movsd xmm13,xmm0'
squrt.S:110: Error: bad instruction `movq rax,xmm0'
squrt.S:111: Error: bad instruction `shl rax,1'
squrt.S:112: Error: bad instruction `shr rax,53'
squrt.S:113: Error: ARM register expected -- `sub rax,1023'
squrt.S:114: Error: ARM register expected -- `add rax,1'
squrt.S:115: Error: bad instruction `sar rax,1'
squrt.S:116: Error: ARM register expected -- `add rax,1023'
squrt.S:117: Error: bad instruction `shl rax,52'
squrt.S:118: Error: bad instruction `movq xmm0,rax'
squrt.S:119: Error: bad instruction `movsd xmm15,xmm0'
squrt.S:120: Error: bad instruction `movsd xmm0,xmm13'
squrt.S:122: Error: ARM register expected -- `mov rax,2'
squrt.S:123: Error: bad instruction `cvtsi2sd xmm14,rax#2'
squrt.S:124: Error: ARM register expected -- `mov rax,8#Anzahl Wiederholungen-1'
squrt.S:126: Error: bad instruction `movsd xmm13,xmm0'
squrt.S:127: Error: bad instruction `divsd xmm13,xmm15'
squrt.S:128: Error: bad instruction `addsd xmm13,xmm15'
squrt.S:129: Error: bad instruction `divsd xmm13,xmm14'
squrt.S:130: Error: bad instruction `movsd xmm15,xmm13'
squrt.S:131: Error: bad instruction `dec rax'
squrt.S:132: Error: bad instruction `jle sqrtEnd'
squrt.S:133: Error: bad instruction `jmp sqrtLoop'
squrt.S:135: Error: bad instruction `movsd xmm0,xmm13'
squrt.S:136: Error: bad instruction `ret'
make: *** [Makefile:2: main] Fehler 1
Is there some package I have to install?
linux gcc assembly
linux gcc assembly
New contributor
New contributor
edited 6 hours ago
Worthwelle
3,0665 gold badges15 silver badges27 bronze badges
3,0665 gold badges15 silver badges27 bronze badges
New contributor
asked 9 hours ago
Lukas HohlLukas Hohl
61 bronze badge
61 bronze badge
New contributor
New contributor
What CPU do you have in your pi?
– ctrl-alt-delor
6 hours ago
add a comment |
What CPU do you have in your pi?
– ctrl-alt-delor
6 hours ago
What CPU do you have in your pi?
– ctrl-alt-delor
6 hours ago
What CPU do you have in your pi?
– ctrl-alt-delor
6 hours ago
add a comment |
1 Answer
1
active
oldest
votes
The "assembly" language is architecture-dependent, since its very point is to directly write CPU instructions, and each CPU type has different ones. Your entire program is written in amd64 / Intel x86_64 assembly code, but Raspbian doesn't run on those – it runs on ARM devices, and so the standard gcc
that comes it also expects ARM assembly.
(Take a look at lscpu
and gcc -dumpmachine
to find out what CPU type you have.)
If you want the program to run on ARM CPUs, you have to rewrite all of it. There's (probably) no gcc package that can compile x86 assembly to run on ARM, though there might be translators to help you with rewriting.
If you want the program to run on amd64/x86_64 CPUs, but only compile it on Raspbian, you have to install a cross-compiler. (It might be in gcc-x86-64-linux-gnu + binutils-x86-64-linux-gnu.)
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "3"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Lukas Hohl is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1462430%2fraspbian-gcc-does-not-know-intel-syntax%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The "assembly" language is architecture-dependent, since its very point is to directly write CPU instructions, and each CPU type has different ones. Your entire program is written in amd64 / Intel x86_64 assembly code, but Raspbian doesn't run on those – it runs on ARM devices, and so the standard gcc
that comes it also expects ARM assembly.
(Take a look at lscpu
and gcc -dumpmachine
to find out what CPU type you have.)
If you want the program to run on ARM CPUs, you have to rewrite all of it. There's (probably) no gcc package that can compile x86 assembly to run on ARM, though there might be translators to help you with rewriting.
If you want the program to run on amd64/x86_64 CPUs, but only compile it on Raspbian, you have to install a cross-compiler. (It might be in gcc-x86-64-linux-gnu + binutils-x86-64-linux-gnu.)
add a comment |
The "assembly" language is architecture-dependent, since its very point is to directly write CPU instructions, and each CPU type has different ones. Your entire program is written in amd64 / Intel x86_64 assembly code, but Raspbian doesn't run on those – it runs on ARM devices, and so the standard gcc
that comes it also expects ARM assembly.
(Take a look at lscpu
and gcc -dumpmachine
to find out what CPU type you have.)
If you want the program to run on ARM CPUs, you have to rewrite all of it. There's (probably) no gcc package that can compile x86 assembly to run on ARM, though there might be translators to help you with rewriting.
If you want the program to run on amd64/x86_64 CPUs, but only compile it on Raspbian, you have to install a cross-compiler. (It might be in gcc-x86-64-linux-gnu + binutils-x86-64-linux-gnu.)
add a comment |
The "assembly" language is architecture-dependent, since its very point is to directly write CPU instructions, and each CPU type has different ones. Your entire program is written in amd64 / Intel x86_64 assembly code, but Raspbian doesn't run on those – it runs on ARM devices, and so the standard gcc
that comes it also expects ARM assembly.
(Take a look at lscpu
and gcc -dumpmachine
to find out what CPU type you have.)
If you want the program to run on ARM CPUs, you have to rewrite all of it. There's (probably) no gcc package that can compile x86 assembly to run on ARM, though there might be translators to help you with rewriting.
If you want the program to run on amd64/x86_64 CPUs, but only compile it on Raspbian, you have to install a cross-compiler. (It might be in gcc-x86-64-linux-gnu + binutils-x86-64-linux-gnu.)
The "assembly" language is architecture-dependent, since its very point is to directly write CPU instructions, and each CPU type has different ones. Your entire program is written in amd64 / Intel x86_64 assembly code, but Raspbian doesn't run on those – it runs on ARM devices, and so the standard gcc
that comes it also expects ARM assembly.
(Take a look at lscpu
and gcc -dumpmachine
to find out what CPU type you have.)
If you want the program to run on ARM CPUs, you have to rewrite all of it. There's (probably) no gcc package that can compile x86 assembly to run on ARM, though there might be translators to help you with rewriting.
If you want the program to run on amd64/x86_64 CPUs, but only compile it on Raspbian, you have to install a cross-compiler. (It might be in gcc-x86-64-linux-gnu + binutils-x86-64-linux-gnu.)
edited 9 hours ago
answered 9 hours ago
grawitygrawity
257k38 gold badges538 silver badges604 bronze badges
257k38 gold badges538 silver badges604 bronze badges
add a comment |
add a comment |
Lukas Hohl is a new contributor. Be nice, and check out our Code of Conduct.
Lukas Hohl is a new contributor. Be nice, and check out our Code of Conduct.
Lukas Hohl is a new contributor. Be nice, and check out our Code of Conduct.
Lukas Hohl is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1462430%2fraspbian-gcc-does-not-know-intel-syntax%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
What CPU do you have in your pi?
– ctrl-alt-delor
6 hours ago