Mail Archives: djgpp/1995/10/14/14:51:04
| Xref: | news-dnh.mv.net comp.os.msdos.djgpp:2636
|
| Path: | news-dnh.mv.net!mv!news.sprintlink.net!howland.reston.ans.net!news.nic.surfnet.nl!tudelft.nl!liberator.et.tudelft.nl!news
|
| From: | George van Venrooij <george AT il DOT ft DOT hse DOT nl>
|
| Newsgroups: | comp.os.msdos.djgpp
|
| Subject: | Optimization and Inline Assembler
|
| Date: | 14 Oct 1995 09:49:47 GMT
|
| Organization: | Hogeschool Eindhoven
|
| Lines: | 16
|
| Nntp-Posting-Host: | u86401.hi.ft.hse.nl
|
| To: | djgpp AT sun DOT soe DOT clarkson DOT edu
|
| Dj-Gateway: | from newsgroup comp.os.msdos.djgpp
|
I have a little question about inline asm-statements:
When I use registers in the input-field, so I could assume a value was in
a register when my asm code ran, I found that listing registers that were
only changed by the asm-code as 'changed' worked fine without
optimization, but gave errors when optimizing.
I managed to correct this by listing the input-registers with the others
as registers that were changed.
The looked something like this (it doesn't matter really):
asm volatile("cdq; \
idivl %%ebx"
: "=a" (var1) : "b" (var2)
- Raw text -