Home > Back-end >  How to embedding assemble language in C language?
How to embedding assemble language in C language?

Time:10-18

I only know C language, is completely don't understand, assembly language, want to optimize the assembly code some C language function, but not completely, like a different compiler instruction set assembly code is different, so do you know what is specifically explain the books or tutorials? Thank you very much!

CodePudding user response:

That still need to know assembler language
Taught Mr. Cheng to find the assembly language

CodePudding user response:

reference 1st floor qybao response:
that still need to know assembler language
Find the assembly language taught Mr. Cheng to

It have a tutorial on C language embedded assembly?

CodePudding user response:

You this is a false proposition, optimize the assembly code, and completely don't understand assembly,
I guess you mean rewriting some functions in C source code, don't need to know assembler, instruction set is CPU is given, the white paper, optimization of function is not write compilers, as long as you good enough safety no problem can be written algorithm, the other to the compiler,

refer to the original poster red yong xuan heart ltd. reply:
I only know the C language, completely don't understand the assembly language and want to optimize the assembly code some C language function, but not completely, like a different compiler instruction set assembly code is different, so do you know what is specifically explain the books or tutorials? Thank you very much!

CodePudding user response:

The
reference 3 floor gouyanfen response:
you that this is a false proposition, optimize the assembly code, and are ignorant assembly,
I guess you mean rewriting some functions in C source code, don't need to know assembler, instruction set is CPU is given, the white paper, optimization of function is not write compilers, as long as you good enough safety no problem can be written algorithm, the other to the compiler,

The
Quote: refer to the original poster red yong xuan heart ltd. reply:

I only know C language, is completely don't understand, assembly language, want to optimize the assembly code some C language function, but not completely, like a different compiler instruction set assembly code is different, so do you know what is specifically explain the books or tutorials? Thank you very much!


I was thinking, but some of the C language code after compiler into assembly efficiency is low, I want to myself to write this assembly, rather than allow the C language compiler to compile,

CodePudding user response:

references 4 floor red yong xuan heart ltd. reply:
Quote: refer to the third floor gouyanfen response:

You this is a false proposition, optimize the assembly code, and completely don't understand assembly,
I guess you mean rewriting some functions in C source code, don't need to know assembler, instruction set is CPU is given, the white paper, optimization of function is not write compilers, as long as you good enough safety no problem can be written algorithm, the other to the compiler,

The
Quote: refer to the original poster red yong xuan heart ltd. reply:

I only know C language, is completely don't understand, assembly language, want to optimize the assembly code some C language function, but not completely, like a different compiler instruction set assembly code is different, so do you know what is specifically explain the books or tutorials? Thank you very much!


I was thinking, but some of the C language code after compiler into assembly efficiency is low, I want to myself to write this assembly, rather than allow the C language compiler to compile,

Compiler does not only need to consider the efficiency and security is also a important indicator, if you want to use assembly rewrite their own library function, that is not written in C, assembler written directly, or you can't bypass the compiler, as long as the C compiler, compiled using C embedded assembly and then going to some transformation like stack processing will not effect you want, but only for fixed CPU architecture to write, no generality,

CodePudding user response:

reference 5 floor gouyanfen reply:
Quote: refer to red, 4/f, yong xuan heart ltd. reply:

Quote: refer to the third floor gouyanfen response:

You this is a false proposition, optimize the assembly code, and completely don't understand assembly,
I guess you mean rewriting some functions in C source code, don't need to know assembler, instruction set is CPU is given, the white paper, optimization of function is not write compilers, as long as you good enough safety no problem can be written algorithm, the other to the compiler,

The
Quote: refer to the original poster red yong xuan heart ltd. reply:

I only know C language, is completely don't understand, assembly language, want to optimize the assembly code some C language function, but not completely, like a different compiler instruction set assembly code is different, so do you know what is specifically explain the books or tutorials? Thank you very much!


I was thinking, but some of the C language code after compiler into assembly efficiency is low, I want to myself to write this assembly, rather than allow the C language compiler to compile,

Compiler does not only need to consider the efficiency and security is also a important indicator, if you want to use assembly rewrite their own library function, that is not written in C, assembler written directly, or you can't bypass the compiler, as long as the C compiler, compiled using C embedded assembly and then going to some transformation like stack processing will not effect you want, but only for fixed CPU architecture to write, no generality,

compiler does not only need to consider the efficiency and security is also a important indicator is the library function, not a compiler, a slip of the pen

CodePudding user response:

reference 5 floor gouyanfen reply:
Quote: refer to red, 4/f, yong xuan heart ltd. reply:

Quote: refer to the third floor gouyanfen response:

You this is a false proposition, optimize the assembly code, and completely don't understand assembly,
I guess you mean rewriting some functions in C source code, don't need to know assembler, instruction set is CPU is given, the white paper, optimization of function is not write compilers, as long as you good enough safety no problem can be written algorithm, the other to the compiler,

The
Quote: refer to the original poster red yong xuan heart ltd. reply:

I only know C language, is completely don't understand, assembly language, want to optimize the assembly code some C language function, but not completely, like a different compiler instruction set assembly code is different, so do you know what is specifically explain the books or tutorials? Thank you very much!


I was thinking, but some of the C language code after compiler into assembly efficiency is low, I want to myself to write this assembly, rather than allow the C language compiler to compile,

Compiler does not only need to consider the efficiency and security is also a important indicator, if you want to use assembly rewrite their own library function, that is not written in C, assembler written directly, or you can't bypass the compiler, as long as the C compiler, compiled using C embedded assembly and then going to some transformation like stack processing will not effect you want, but only for fixed CPU architecture to write, no generality,


I think is used to write some function, and some function is written in C language, I just don't know how to start now, is there any relevant tutorial?

CodePudding user response:

What won't help you this way, can only look at assembly language

CodePudding user response:

refer to the eighth floor gouyanfen response:
what won't help you this way, can only look at the assembly language

Oh, good, thank you for your answer, I still look for assembly language tutorial first,

CodePudding user response:

May be your syntax written is not good, see the article says, compiled C code is almost like assembly,
Such as + +;
You can write I + 1, efficiency is low,

CodePudding user response:

references to the tenth floor m0_46108109 response:
may be the syntax you write is not good, see the article says, compiled C code is almost like assembly,
Such as + +;
You can write I + 1, efficiency is low,


+ + and assembly code + 1 is the same, but this has much to do and compiler, different compiler results may be different,
  • Related