subroutine stack and C machine model

S

Stefan Ram

Frank said:
Wie sagt man 'stack' auf Deutsch?

The »Kellerspeicher« was invented and patented in 1957 by
the German Friedrich Ludwig Bauer. So this concept was
first named by a German word.

http://en.wikipedia.org/wiki/Stack_(data_structure)

The term »stack« (»Stapel«) was coined later, and Bauer was
reported to have said, that he actually prefered it to his
original term, IIRC.

One reference is

Sequential Formula Translation
K. Samelson and F. L. Bauer
Communications of the ACM
Volume 3, Issue 2 (February 1960)
Pages: 76 - 83
ISSN:0001-0782
 
B

bartc

Dik said:
What is the hardware-distinguished stack pointer register of the ARM?


ARM processors and their reference manuals are not the easiest things to
find your way around. Nevertheless, from what I could figure out, ARM6 at
least seems to use R13 as a hardware stack pointer, subject to a bunch of
provisos, clauses and references which I was not inclined to follow
through.

(I feel sorry for those who have to program these things at low level. Is
nobody capable of making anything simple and elegant these days?)
 
C

Chris Dollin

bartc said:
ARM processors and their reference manuals are not the easiest things to
find your way around. Nevertheless, from what I could figure out, ARM6 at
least seems to use R13 as a hardware stack pointer, subject to a bunch of
provisos, clauses and references which I was not inclined to follow
through.

However, R13 is no different in hardware to R0..R12 [1]; it is [certainly
in the ARM3] the "stack pointer" by software convention, rather than hardware
necessity. You can do pushy and poppy things with R3 just as well as with
R13.

[1] Not /quite/ true, in two ways which are both irrelevant, I think, to
the current discussion.

(a) it has number 13 rather than some other number. This makes a
difference to code that uses the load/store multiple instructions,
since the place it gets stored to will depend on which register
you pick; you can't just rename all the registers in your code,
you'll have to mess around with offsets too. It's /convenient/
that it's at the "end" of the "ordinary register" space, but were
it not, it would be only a minor inconvenience.

(b) it's a shadowed register; there's an R13 for each processor mode.
This matters for interrupt handling but not user code.

In contrast, R15 is very special, since it's the program counter, and
R14 is a little special, since it's the return-address register. Note
that it's special property is just that the return address gets written
to it on calls. [I think post-ARM3 this changes, to cope with full 32-
bit addressing; the "return address" used to combine the address and
the processor flags.]
 
D

Dik T. Winter

> Dik T. Winter wrote: ....
>
> ARM processors and their reference manuals are not the easiest things to
> find your way around. Nevertheless, from what I could figure out, ARM6 at
> least seems to use R13 as a hardware stack pointer, subject to a bunch of
> provisos, clauses and references which I was not inclined to follow
> through.

As far as I have been able to ascertain this is about interrupts.
> (I feel sorry for those who have to program these things at low level. Is
> nobody capable of making anything simple and elegant these days?)

The machine is not designed to be programmed at a low level. However, there
have been worse machines.
 
J

Joachim Schmitz

Keith said:
"Kiki" appears to be KM's deliberately offensive nickname for me.
I'll thank you not to use it.

While I accept that you don't like to be called Kiki, I fail to understand
why this is offensive?, mind to explain?

Bye, Jojo
 
R

REH

Keith Thompson wrote:
While I accept that you don't like to be called Kiki, I fail to understand
why this is offensive?, mind to explain?

You need a better reason than it's not his name, and it's a juvenile
attempt to antagonize him?

REH
 
J

jameskuyper

Joachim said:
While I accept that you don't like to be called Kiki, I fail to understand
why this is offensive?, mind to explain?

First of all, it's not his actual name, nor even a standard English
nickname for a name like Keith; that's enough in itself to suggest an
intent to be insulting.

Secondly, English nicknames ending in 'i' and 'y' tend to have
diminutive connotations, and are often used to refer to a lover, a
small child, or a pet. When the diminutive form is not clearly
intended as a joke (such as a nickname of "Tiny" for a huge man), the
connotation is often that it is the person's social status which is
diminutive, such as that of a pet relative to it's owner, or a child
relative to an adult, or (in sexist society) women relative to men.
This is often consider (and sometimes intended) to be offensive,
especially if the perception of low social status is not shared by the
person the nickname refers to.

Note the heavy use of weasel wording such as "tend", and "often" in
the above paragraph. The selection of such a nickname is not, in
itself, proof of an intent to insult. However, the single biggest
reason why this particular nickname is offensive is that KM has
tainted it by using it almost exclusively in contexts which make it
quite clear that the connotation of low status is intended.
 
K

Keith Thompson

Joachim Schmitz said:
While I accept that you don't like to be called Kiki, I fail to
understand why this is offensive?, mind to explain?

It's almost certainly intended to be offensive. It's also not
my name. (I happen to dislike most nicknames that are derivatives
of my first name, but that's not really the point.)
 
J

Joachim Schmitz

jameskuyper said:
Joachim said:
Keith said:
[...]
I'm approximately as worried about kiki as I am texas right now.
We have differences.

"Kiki" appears to be KM's deliberately offensive nickname for me.
I'll thank you not to use it.

While I accept that you don't like to be called Kiki, I fail to
understand why this is offensive?, mind to explain?

First of all, it's not his actual name, nor even a standard English
nickname for a name like Keith; that's enough in itself to suggest an
intent to be insulting.

Secondly, English nicknames ending in 'i' and 'y' tend to have
diminutive connotations, and are often used to refer to a lover, a
small child, or a pet. When the diminutive form is not clearly
intended as a joke (such as a nickname of "Tiny" for a huge man), the
connotation is often that it is the person's social status which is
diminutive, such as that of a pet relative to it's owner, or a child
relative to an adult, or (in sexist society) women relative to men.
This is often consider (and sometimes intended) to be offensive,
especially if the perception of low social status is not shared by the
person the nickname refers to.

Note the heavy use of weasel wording such as "tend", and "often" in
the above paragraph. The selection of such a nickname is not, in
itself, proof of an intent to insult. However, the single biggest
reason why this particular nickname is offensive is that KM has
tainted it by using it almost exclusively in contexts which make it
quite clear that the connotation of low status is intended.

OK, thanks for that explanation. Makes sense but is a bit weak IMHO.

Bye, Jojo
 
K

Keith Thompson

Joachim Schmitz said:

No, you don't.

To be clear, you certainly don't *need* to know why I dislike it.
I don't mind explaining it, as I've already done elsethread.
But surely the reasons cited by REH are good enough.
 
J

Joachim Schmitz

Keith said:
No, you don't.

Well, I do. It's not vital though...
To be clear, you certainly don't *need* to know why I dislike it.

Right. But I need to know what is offensive about it.
I don't mind explaining it, as I've already done elsethread.
But surely the reasons cited by REH are good enough.

For disliking it yes, but I don't think this is enough to explain it's
offensiveness

Bye, Jojo
 
J

Joachim Schmitz

Keith said:
Joachim Schmitz said:
Keith said:
[...]
I'm approximately as worried about kiki as I am texas right now.
We have differences.

"Kiki" appears to be KM's deliberately offensive nickname for me.
I'll thank you not to use it.

While I accept that you don't like to be called Kiki, I fail to
understand why this is offensive?, mind to explain?

It's almost certainly intended to be offensive. It's also not
my name. (I happen to dislike most nicknames that are derivatives
of my first name, but that's not really the point.)

Rumsfeld meant to offend us (the Germans and the Frensh, mainly) when
calling us 'the old Europe' (because we refused to go to war with Irak). The
majority here didn't find that offensive at all but felt honoured instead.
So intention is not enough to explain why you find it offensive.

Whatever. let's leave it at that, I just thought, as not being a native
english speaker, I migh be missing some obvious connotation. Apparently I'm
not.

Bye, Jojo
 
K

Kenny McCormack

You need a better reason than it's not his name, and it's a juvenile
attempt to antagonize him?

REH

How do you know (what makes you think) it is an attempt to antagonize him ?
How do you know (what makes you think) it is juvenile ?
 
K

Keith Thompson

Joachim Schmitz said:
Well, I do. It's not vital though...


Right. But I need to know what is offensive about it.


For disliking it yes, but I don't think this is enough to explain it's
offensiveness

Ok, now I'm curious. *Why* do you need to know? What difference
could it possibly make to you?

The phrase "need to know" usually implies something more than
curiosity, for example that you have a real need to do something,
or refrain from doing something, based on the information.

To clarify my earlier remarks a bit, what I wrote previously was:

"Kiki" appears to be KM's deliberately offensive nickname for me.

What I meant, I suppose, was that KM intended it to be offensive (an
assumption, but a safe one), not that the name itself is inherently
offensive (it certainly wouldn't be if that were really my name).
I could have expressed myself more clearly, but I didn't think
it was that important. (I don't much care what KM says about me,
but I'd rather not see others pick up his annoying habits.)
 
J

James Dow Allen

[...] I'm fishing for an execution model that uses the [setjump/longjmp]
functions.  

poor mans exception handler

It can also be used as a carefree man's backtracker as at
http://james.fabpedigree.com/rrome.htm
where the calls occur from the following macros:

#define EITHER if (S[1] = S[0], ! setjmp((S++)->jb)) {
#define OR } else EITHER
#define REJECT longjmp((--S)->jb, 1)
#define END_EITHER } else REJECT;

James Dow Allen
 
D

Default User

Joachim said:
While I accept that you don't like to be called Kiki, I fail to
understand why this is offensive?, mind to explain?

Besides what the others have mentioned, in English-speaking countries
it's generally a female name.



Brian
 
S

Seebs

Right. But I need to know what is offensive about it.

Why?

Seriously, who cares? Maybe it's offensive because he used to like Sluggy
Freelance but now he hates it. Who cares? It's offensive.

-s
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,991
Messages
2,570,212
Members
46,800
Latest member
Tobi1987

Latest Threads

Top