Re: assembly language and reverse engineering
- From: "cr88192" <cr88192@xxxxxxxxxxx>
- Date: Fri, 14 Dec 2007 09:45:24 +1000
"Wolfgang Kern" <nowhere@xxxxxxxx> wrote in message
news:fjp0eg$ak5$3@xxxxxxxxxxxxxxxxxxxxxxxx
"cr88192" wrote:
[...GPU's]
This graphic chips, with their internal 128-bit bus and the hardwired
logic circuits, are already abused for other than graphic matrix calc.
Whenever we get enough information how all these different chips work
(seems only two main vendors may survive the battle anyway), we will
have to update our tools. Hard times for the C-camp :)
my hope is that we are not burdened with having to use GPU-specific stuffthe > main processors (hopefully, in a much more standardized manner, eg,
for general programming.
I would much rather see bulk-parallelism being done for side-versions of
all the
processors using more-or-less the same instruction set, and all this
being
at least reasonably well standardized...).
Yeah, let our wishes reach all designers and merchants involved in this!
Intel has made something like this (at least, I think, the things are x86).
their view of the future is now one where many-core systems will offer
ever-increasing power.
if/when this will become common, I don't know.
[..compilers]
It's rumoured that C-compilers are fully platform independent, but when
I look at my OS which doesn't follow the C-calling convention nor any
other stack-polluting-parameter-copy-passing method, then my question
is: can your compiler or any C,C-/+ variant be configured for a
"strict arguments in registers" and
"arguments by pointer in register" and
"several return arguments in registers" and
"return arguments to struct pointed to by register" and
"return comparision results/error-indication by flag-status",
or would I need to write my own C-compiler ?
to do all this, my compiler would probably need at least some fairlycan > ignore this).
heavy
modification for all this.
my compiler follows CDECL, and is generally fairly heavily based in the
assumptions of CDECL-like conventions (also supports STDCALL, ... but we
now, cdecl generally passes args on the stack, and uses an implicit extra
arg for handling struct return (slightly compiler, and compiler version,
specific, as sometimes the compiler implementors decide to return small
structs in regs, SSE regs, ... so the conventions are not always entirely
consistent).
using flags for return status, would be a very problematic (and
doubtfully
useful) feature.
doubtfully useful ?
I think it's just a matter of definition, I use somthing like:
CY = error ;other flags may indicate the cause
NC = OK ;other flags can hold additional info ie:
Z = equal/zero S = sign/below zero O=.. AC=.. P=..
There is 'some' power in SETcc/CMOVcc beside Jcc right after a CALL.
yes, but there are other, more common ways of supporting this kind of info.
most people who call C functions, do so from C, and for C.
I once considered implementing a "modified core" (basically, this woulduse
heap-based memory for everything and compile code using a CPS-based
structure), but I never really implemented this (it would allow good
performance for compiling functional languages, but would somewhat hurt
normal C code...).
otherwise, the usual answer for interfacing C with tweaky/custom
assembler
code is this:
write interface stubs.
The latter could be option, but I'm afraid of loosing too much
performance then.
that is a cost I guess...
however, C code is C code, with performance that is mediocre even when
optimized.
C code is comprable to hand written assembler for "Joe-Blow
just-get-this-crap-over-already" code, but much beyond this, hand written
code has the edge (as humans tend to have somewhat better register
allocation and flow-prediction abilities than the compiler...).
these costs are inherent.
actually, in my case, it is possible a future compiler will no longer use
the more 'traditional' control flow/framing mechanisms, but will instead pay
(in terms of slightly higher overhead for really simple code), and make use
of a CPS-style code structuring.
reason:
this structure allows a lot of things that are problematic and expensive
with the more traditional approaches (tail-call-optimization, more advanced
scope handling, continuations, soft threading and work queueing, ...).
the big problems are this:
CPS is more complicated;
CPS makes interacting with existing code a little uglier (use of multiple
amd hybrid calling conventions);
....
__
wolfgang
.
- Follow-Ups:
- Re: assembly language and reverse engineering
- From: Wolfgang Kern
- Re: assembly language and reverse engineering
- References:
- assembly language and reverse engineering
- From: travisjg
- Re: assembly language and reverse engineering
- From: cr88192
- Re: assembly language and reverse engineering
- From: Herbert Kleebauer
- Re: assembly language and reverse engineering
- From: cr88192
- Re: assembly language and reverse engineering
- From: Herbert Kleebauer
- Re: assembly language and reverse engineering
- From: cr88192
- Re: assembly language and reverse engineering
- From: Herbert Kleebauer
- Re: assembly language and reverse engineering
- From: cr88192
- Re: assembly language and reverse engineering
- From: Herbert Kleebauer
- Re: assembly language and reverse engineering
- From: cr88192
- Re: assembly language and reverse engineering
- From: Wolfgang Kern
- Re: assembly language and reverse engineering
- From: cr88192
- Re: assembly language and reverse engineering
- From: Wolfgang Kern
- Re: assembly language and reverse engineering
- From: cr88192
- Re: assembly language and reverse engineering
- From: Wolfgang Kern
- Re: assembly language and reverse engineering
- From: cr88192
- Re: assembly language and reverse engineering
- From: Wolfgang Kern
- Re: assembly language and reverse engineering
- From: cr88192
- Re: assembly language and reverse engineering
- From: Wolfgang Kern
- assembly language and reverse engineering
- Prev by Date: Re: When a computer start
- Next by Date: Re: assembly language and reverse engineering
- Previous by thread: Re: assembly language and reverse engineering
- Next by thread: Re: assembly language and reverse engineering
- Index(es):
Relevant Pages
|
|