Stack Management and Calling Conventions

نویسنده

  • Julio Gonnet
چکیده

Despite the advantages and simplicity of stack machines, they are not very often found or supported in commercial computer systems. This paper explains the need for stacks in modern programming languages and describes three dimensions used to categorize the different stack implementations. Furthermore, we will discuss the application and support of stacks and their integration in modern computing architectures such as RISC, CISC and virtual machines. We then outline the most common calling conventions used today and their implications on the code resp. the underlying hardware. The paper is rounded off by a brief introduction in Stack Buffer Overflows and a few

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Custom Calling Conventions in a Portable Assembly Language

Calling conventions are so difficult to implement and maintain that people rarely experiment with alternatives. The primary sources of difficulty appear to be parameter passing and stack-frame layout. To implement parameter passing, we use the automata developed by Bailey and Davidson, but we have developed a new specification language that is implementable directly in the compiler. To implemen...

متن کامل

A Formal Model and Specification Language for Procedure Calling Conventions

ly, data placement definitions are functions that map values onto machine resources. The functions take a value and corresponding attributes (such as data type) and decide where the value belongs. More precisely, placement definitions are finite state machines, since the mapping is order-dependent. Figure 2 illustrates an application of a placement definition to place procedure arguments. In th...

متن کامل

Stack-Based Typed Assembly Language

In previous work, we presented a Typed Assembly Language (TAL). TAL is sufficiently expressive to serve as a target language for compilers of high-level languages such as ML. This work assumed such a compiler would perform a continuation-passing style transform and eliminate the control stack by heap-allocating activation records. However, most compilers are based on stack allocation. This pape...

متن کامل

Declarative Composition of Stack Frames

When a compiler translates a procedure, it must lay out the procedure’s stack frame in a way that respects the calling convention. Many compilers respect the convention either by restricting the order in which slots can be allocated or by using different abstractions ad hoc for allocating in different regions of a frame. Such techniques cause the implementation of the layout to be spread over m...

متن کامل

Multithreading Languages

It is di cult to map the execution model of multithreading languages (languages which support ne-grain dynamic thread creation) onto the single stack execution model of C. Consequently, previous work on e cient multithreading uses elaborate frame formats and allocation strategy, with compilers customized for them. This paper presents an alternative cost-e ective implementation strategy for mult...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2006