Compiler Page

Prev

 

Next

---

Vector Pascal

 

Vector Pascal is a language targeted at SIMD instructionsets such as the MMX and the AMD 3d Now. It currently supports

*   the 486,

*   the Pentium,

*   the K6 and

*   the P3 processors.

It supports parallel vector operations, loop unrolling, common sub expression removal.

It is implemented in Java, and class libraries are currently available for download

Overview

An overview article in .pdf format.

A comparison with other languages and implementation details are given in Vector Pascal an Array Language. A .pdf and a .ps version are also available.

Reference manual

.pdf version

postscript version

.html version, note that some formulae do not appear correctly in the html version.

The code generator technology used to retarget the compiler to different platforms is documented in: Direct compilation of high level languages to multi media instructionsets. Covers use of MMX, 3DNOW and SIMD  instructions to obtain parallelism. Also available as HTML

Speedups

Vector Pascal provides considerable speedups on vector loop based applications:

  Performance on vector kernels

DevP

TMT

BP 286

DP 486

VP 486

VP K6

test

71

80

46

166

333

2329

unsigned byte additions

55

57

38

110

179

2329

saturated unsigned byte additions

85

59

47

285

291

466

32 bit integer additions

66

74

39

124

291

1165

16 bit integer additions

47

10

33

250

291

388

real additions

49

46

23

98

146

2330

pixel additions

67

14

39

99

146

1165

pixel multiplications

47

10

32

161

146

141

real dot product

79

58

33

440

161

166

integer dot product

DevP - Dev Pascal version 1.9

TMT - TMT Pascal version 3

BP 286 - Borland Pascal compiler with 287 instructions enabled range checks off.

DP 486 - Delphi version 4

VP 486 - Vector Pascal targeted at a 486

VP K6 - Vector Pascal targeted at and AMD K6

All figures in millions of operations per second on a 1 Ghz Athlon.

 Vectorisation gains with P3 and Athlon processors

 

P3

Athlon

operation

% vectorisation speedup

% vectorisation speedup

byte+

423

599

byte +:

1126

1201

int +

75

60

short +

332

300

real +

62

33

pixel +

814

1496

pixel *

290

698

real dot product

29

-3

integer dot product

-4

3

Figures give the % speedup from using native code generators versus generic 486 code generators on a 450Mhz P3 and a 1Ghz Athlon.

Download

The following Pascal Compiler downloads are available:

Linux release, compiler version 0.13, code generator version 0.07 as a .jar file. Please download the manual for details of system setup and requirements.

Compiler version 0.53 code generator version 0.34 is available as: linstall0_53_0_34.jar.

Compiler version 0.58 and code generator version 0.34 is available as: linstall0_58.jar. This version fixes the following bugs:

1. Passing of var parameters which are themselves pointers is handled correctly.

2. Loop iteration variables for parallel code were previously stored in ram, now they are cached in registers when sufficient are available.

Binary compiler version 1.59 available as windows release Adds operator overloading, complex arithmetic, new array permutaion operations, conditional expressions.

 

Binary compiler version 1.81 for Linux and for Windows. Adds some new opcode definitions, fixes bugs found when compiling the Dhrystone benchmark.

Build 3.203 for windows incorporates some bug fixes and the Viper IDE for vector pascal.

---

Source downloads

Latest source release build 3.203 in the jar file src.jar.

 

 

There is a make file available in the top level directory. System is implemented in Java. The code generation tools use the Sable parser generator from McGill University. Sources for this are included in the ca/Mcgill/Sable directory. Jlex is used to provide the Pascal Lexical analyser.

 

 

Keywords: Pascal, free Compiler, MMX, Vector, SSE, 3Dnow!

 

Prev

Home

Next

Compiler Page

 

Teaching exercises