about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2014-07-29 16:40:59 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-07-31 07:30:17 -0700
commit4db68e644e2e7bef55ed536ac77f87292260527c (patch)
treef4f515bed4ef231d75f17fd49779816cfefbe006 /src/rustllvm/RustWrapper.cpp
parent134946d06e6926e087a792ac13c7f4421591afed (diff)
downloadrust-4db68e644e2e7bef55ed536ac77f87292260527c.tar.gz
rust-4db68e644e2e7bef55ed536ac77f87292260527c.zip
Modify failure lang items to take less pointers.
Divide-by-zero before:

```
        leaq    "str\"str\"(1762)"(%rip), %rax
        movq    %rax, 16(%rsp)
        movq    $27, 24(%rsp)
        leaq    "str\"str\"(1542)"(%rip), %rax
        movq    %rax, (%rsp)
        movq    $19, 8(%rsp)
        leaq    16(%rsp), %rdi
        leaq    (%rsp), %rsi
        movl    $32, %edx
        callq   _ZN7failure5fail_20hc04408f955ce60aaqWjE@PLT
```

After:

```
        leaq    .Lconst(%rip), %rdi
        callq   _ZN7failure5fail_20haf918a97c8f7f2bfqWjE@PLT
```

Bounds check before:

```
        leaq    "str\"str\"(1542)"(%rip), %rax
        movq    %rax, 8(%rsp)
        movq    $19, 16(%rsp)
        leaq    8(%rsp), %rdi
        movl    $38, %esi
        movl    $1, %edx
        movl    $1, %ecx
        callq   _ZN7failure17fail_bounds_check20hf4bc3c69e96caf41RXjE@PLT
```

Bounds check after:

```
        leaq    .Lconst2(%rip), %rdi
        movl    $1, %esi
        movl    $1, %edx
        callq   _ZN7failure17fail_bounds_check20h5267276a537a7de22XjE@PLT
```

Size before:

21277995 librustc-4e7c5e5c.s

```
text       data
12554881   6089335
```

Size after:

21247617 librustc-4e7c5e5c.so

```
text       data
12518497   6095748
```
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions