自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(20)
  • 资源 (22)
  • 收藏
  • 关注

原创 Studying note of GCC-3.4.6 source (7)

1.2.4. Create node for address conceptIn C++, concept of pointer, reference, and address are exchangable at certain level. The langauage allows to manipulate the content of the address directly via

2010-02-26 11:52:00 758

原创 GCC-3.4.6源代码学习笔记(7)

1.2.4. 与地址相关节点的构造在C++中,指针、引用和地址在一定程度上可以混用。语言允许通过指针或者引用直接改变地址所在的内容。而函数调用,事实上是通过跳转到相应的地址来实现。另外在语言中,数组名也代表数组的首地址。因此,编译器可能需要首先创建与地址相关的节点,再由这个节点出发构建其它节点。比如,构建函数或数组节点。1.2.4.1.      指针类型节点的构造1.2.4.1.1.

2010-02-26 11:48:00 1316

原创 Modultils工具源码分析之insmod篇 (4续)

xftw在./modutils-2.4.0/util/xftw.c中。在ftw.c文件的开头有一大段注释,解释了这一族函数的由来。特摘录如下。Insmod——xftw函数24    /*25        modutils requires special processing during the file tree walk26        of /lib/modules

2010-02-25 13:39:00 1128

原创 Modultils工具源码分析之insmod篇 (4)

至此,do_read的工作就完成了,接着config_read也结束。继续看INSMOD_MAIN。 1565              if (persist_name && !*persist_name &&1566                  (!persistdir || !*persistdir)) {1567                     free(pe

2010-02-25 13:16:00 849

原创 Studying note of GCC-3.4.6 source (6)

1.2.3. Create node for real constantNode in GCC to represent real constant is tree_real_cst as below.1.2.3.1.    Node of tree_real_cst 702  struct tree_real_cst GTY(())                        

2010-02-25 11:58:00 1040

原创 GCC-3.4.6源代码学习笔记(6)

1.2.3. 创建浮点常量节点在GCC中表示浮点常量的节点是下面所示的tree_real_cst。1.2.3.1.    tree_real_cst节点 702  struct tree_real_cst GTY(())                                                                                in

2010-02-25 11:47:00 1415

原创 Studying note of GCC-3.4.6 source (5)

1.2.2. Create node for internal types For internal types of the language, for example, int, unsigned short in C/C++, the compiler will create nodes for these types first when it starts up.1.2.2.1.

2010-02-24 12:11:00 976

原创 GCC-3.4.6源代码学习笔记(5)

1.2.2. 内建类型的树节点对于语言中的内建类型,例如,C/C++中的int,unsigned short等,编译器在启动时便会为这些类型创建节点。1.2.2.1.            初始化临时的size_t节点在创建内建类型的节点前,先要创建临时的size_t节点(一个用作size_t,另一个用作bitsize_t。size_t是sizeof的返回类型,bitsize_t由前端

2010-02-24 11:40:00 1828

原创 Modultils工具源码分析之insmod篇 (3续)

我们继续看meta_expand余下的代码。251~255行处理“"/”这样的元符号,其实就是字符串引用符号。257~260行则是处理普通字符及仅有“=”的情况。函数split_line也在同一文件中。Insmod——split_line函数47    /*48    * Split into words delimited by whitespace,49    * handl

2010-02-23 12:05:00 889 1

原创 Modultils工具源码分析之insmod篇 (3)

在./modutils-2.4.0/depmod/目录下有一个配置文件的样式,Example.module.conf。 1     # This is an example of additional definitions you can put in /etc/modules.conf2     # Note that modprobe has some default alias

2010-02-23 11:58:00 1130

原创 Studying note of GCC-3.4.6 source (4)

1.2. Building tree nodesAbove make_node gives the tool to create nodes for certain tree code. However, this facility is quite primitive. GCC also defines a series functions to create nodes group for

2010-02-23 11:44:00 887

原创 GCC-3.4.6源代码学习笔记(4)

1.2. 树节点的构造上面make_node提供了构造树节点的方法,但它比较初级,节点由0填充。为了更好地为表达式,语句等语法成分构造树节点,GCC定义了一系列函数。我们先看一部分。1.2.2. 机器模式的概念[2]机器模式描述了一个数据对象的大小和它的表示方式。在GCC中,机器模式由定义在machmode.def文件中的枚举类型enum machine_mode来表示(准确地说,ma

2010-02-23 11:40:00 2507

原创 Modultils工具源码分析之insmod篇 (2)

insmod的入口在insmod.c,在./modultils-2.4.0/insmod/下。 1944       /* For common 3264 code, only compile main in the 64 bit version. */1945       #if defined(COMMON_3264) && defined(ONLY_32)1946      

2010-02-22 13:25:00 3171

原创 Modultils工具源码分析之insmod篇 (1)

这系列是几年前发的。现在回过头看,还是蛮有意思的。把它们一起放上来。 Modultils工具源码分析之insmod篇 作者:吴晖2005年12月29日前言Linux的前身UNIX是一个巨内核操作系统,这样的系统运行效率高,但是内核占据的资源比较多,而且更要命的是系统在启动时必须把所有的设备驱动都加载,不管有没有用。另外,每添加或修改驱动都要重新编

2010-02-22 12:53:00 3403

原创 Studying note of GCC-3.4.6 source (3)

1.1.3. Tree node allocation1.1.3.1.    Decision of node sizeThe allocaiton function of tree node is done by make_node below. The detail of parameter code is shown in above tables, note that it is

2010-02-22 11:46:00 1059

原创 GCC-3.4.6源代码学习笔记(3)

1.1.3. 树节点的内存分配1.1.3.1.      节点大小的确定树节点由下面的make_node函数来分配。函数中的参数code,在上面的表中给出,注意它也是由.def文件定义的。 202  tree203  make_node (enum tree_code code)                                                

2010-02-22 11:40:00 1705

原创 Studying note of GCC-3.4.6 source (2)

1.1.1. Identifier of tree node - tree_code Within the definition of tree_node, items like tree_type, tree_decl etc, are used for the semantics ingrediences, for example, tree_type is used for type d

2010-02-21 15:10:00 1492

原创 Studying note of GCC-3.4.6 source (1)

About 4 years ago, I joined GDNT – the coventure of Nortel in China and worked in project of Radio access network of 3G UMTS; where I used GCC first time. At that time Nortel widely used GCC as the of

2010-02-21 15:06:00 1903

原创 GCC-3.4.6源代码学习笔记(2)

1.1.1. tree_code —— 树节点的ID在tree_node的定义中,结构体,象tree_type,tree_decl 等,用于代表相应的语法成分。比如,tree_type用于类的定义,而type_decl用于声明。但如果需要进一步分别,比如tree_decl节点为何种声明,则我们需要用到在tree_node中的另一个位。这就是在tree_common定义中,第134行的code。

2010-02-21 14:49:00 3563

原创 GCC-3.4.6源代码学习笔记(1)

大约4年前,我加入了GDNT - 北电网络在中国的合资企业,参与3G UMTS无线接入网的研发工作。与GCC有了第一次亲密的接触(之前使用的是MS的VC)。彼时,北电在其诸如,UMTS、CDMA、及自行开发的众多工具等项目中(此后,在4G项目,Wimax及Lte中),将GCC作为标准编译器来使用。每周我都需要进行数次的loadbuild,编译出load文件进行测试,以验证我对一些bug的修正代码。

2010-02-21 14:43:00 8019 15

Introduction to Theory of Computation

This is a free textbook for an undergraduate course on the Theory of Computation, which we have been teaching at Carleton University since 2002.Until the 2011/2012 academic year, this course was offered as a second-year course (COMP 2805) and was compulsory for all Computer Science students. Starting with the 2012/2013 academic year, the course has been downgraded to a third-year optional course (COMP 3803).

2018-09-23

Survey on Instruction Selection

Instruction selection is one of three optimization problems involved in the code generator back-end of a compiler. The instruction selector is responsible of transforming an input program from its target-independent representation into a target-specific form by making best use of the available machine instructions. Hence instruction selection is a crucial part of efficient code generation.

2018-09-23

Towards a Compilation infrastructure for network processors

Modern network processors (NPs) typically resemble a highly-multithreaded multiprocessor-ona-chip, supporting a wide variety of mechanisms for on-chip storage and inter-task communication. NP applications are themselves composed of many threads that share memory and other resources,and synchronize and communicate frequently. In contrast, studies of new NP architectures and features are often performed by benchmarking a simulation model of the new NP using independent kernel programs that neither communicate nor share memory. In this paper we present a NP simulation infrastructure that (i) uses realistic NP applications that are multithreaded, share memory, synchronize, and communicate; and (ii) automatically maps these applications to a variety of NP architectures and features. We use our infrastructure to evaluate threading and scaling, on-chip storage and communication, and to suggest future techniques for automated compilation for NPs.

2018-09-23

the art of multiprocessor programming

The first third covers the principles of concurrent programming, showing how to think like a concurrent programmer. Like many other skills such as driving a car, cooking a meal, or appreciating caviar, thinking concurrently requires cultivation, but it can be learned with moderate effort. Readers who want to start programming right away may skip most of this section, but should still read Chapters 2

2018-09-23

Crafting a Compiler

Brief Contents 1 Introduction 1 2 A Simple Compiler 31 3 Scanning—Theory and Practice 57 4 Grammars and Parsing 113 5 Top-Down Parsing 143 6 Bottom-Up Parsing 179 7 Syntax-Directed Translation 235 8 Symbol Tables and Declaration Processing 279 9 Semantic Analysis 343 10 Intermediate Representations 391 11 Code Generation for a Virtual Machine 417 12 Runtime Support 445 13 Target Code Generation 489 14 Program Optimization 547

2018-09-01

How Debuggers Work

a total guide to debuggers: what they do, how they work, and how to use them to produce better programs

2018-09-01

Elements of Compiler Design

This book is intended as a text for a one-term introductory course in compiler writing at a senior undergraduate level. It maintains a balance between a theoretical and practical approach to this subject. From a theoretical viewpoint, it introduces rudimental models underlying compilation and its essential phases.

2018-09-01

category-theory-for-programmers

category theory is a treasure trove of extremely useful programming ideas. Haskell programmers have been tapping this resource for a long time, and the ideas are slowly percolating into other languages, but this process is too slow. We need to speed it up. Second, there are many different kinds of math, and they appeal to different audiences. You might be allergic to calculus or algebra, but it doesn't mean you won't enjoy category theory. I would go as far as to argue that category theory is the kind of math that is particularly well suited for the minds of programmers. That’s because category theory — rather than dealing with particulars — deals with structure. It deals with the kind of structure that makes programs composable.

2018-09-01

Language_Implementation_Patterns_C

This book gives you just the tools you'll need to develop day-to-day language applications. You'll be able to handle all but the really advanced or esoteric situations. For example, we won't have space to cover topics such as machine code generation, register allocation, automatic garbage collection, thread models, and extremely efficient interpreters. You'll get good all-around expertise implementing modest languages, and you'll get respectable expertise in processing or translating complex languages

2018-09-01

Compiler Construction-20th

the essays collection of conference of Compiler Construction-20th

2018-09-01

Compiler Construction-19th

the essays collection of conference of Compiler Construction-19th

2018-09-01

Compiler Construction-17th

the essays collection of conference of Compiler Construction-17th

2018-09-01

Compiler Construction-16th

the essays collection of conference of Compiler Construction-16th

2018-09-01

Compiler Construction-5th

the essays collection of conference of Compiler Construction-5th

2018-09-01

Construction and Evolution of Code Generator

It describes the Construction and Evolution of Code Generator

2018-09-01

Modern Embedded Computing Designing Connected, Pervasive, Media-Rich Systems

Modern Embedded Computing Designing Connected, Pervasive, Media-Rich Systems

2018-09-01

Compiler Construction-11th

the essays collection of conference Compiler Construction-11th

2018-09-01

The compiler design handbook

The compiler design handbook, which describes the design practice of compiler

2018-09-01

Data_Flow_Analysis_Theory_And_Practice(Bookos.org)

Data Flow Analysis Theory And Practice for compiler development

2018-09-01

The Compiler Design Handbook Optimizations and machine code generation

The Compiler Design Handbook Optimizations and machine code generation

2018-09-01

C++_Coding_Standards_101_Rule

C++ Coding Standards 101 Rule, Andrei Alexandrescu

2018-08-24

instruction scheduling for instruction level parallel processor

instruction scheduling for instruction level parallel processor

2018-07-16

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除