-
-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add the ability to strip data #304
Comments
Do you have an example to reproduce the problem? |
Not that I can easily extract. Something like this should work on your end though: fn square(x: usize) -> usize {
let lut = const {
let mut lut = [0; 4096];
let mut i = 0;
while i < 4096 {
lut[i] = i * i;
}
lut
};
lut[x]
} It might be worth noting that I'm compiling for an ARM-based platform so perhaps the way the compiler treats static data might be a little different given the differences in addressing mode (ARM only really supports near addresses without building up a pointer manually in a register). |
On x86 this generates a huge table but it goes into a separate section so output is still perfectly readable. Can you post some sample output of how it looks on arm? Preferably something not too huge? |
Here's an example. Note the extremely long lines which, when displayed in a terminal, wrap. |
Is that the output from |
If it dumps in a single line I'd use something like |
Anyway, I don't mind adding something to deal with this issue, but only if it can't be solved with |
In theory I can process the output in any number of ways, but I think an option like |
I'm writing code that's making considerable use of LUTs generated inline via const code. As a result, I end up with the LUT data being displayed inline with the code, which is often many thousands of times larger than the code itself. It would be useful to have the option to strip data or - even better - data over a specific length from the output.
EDIT:
For anybody with a similar problem, my solution for now is:
which strips all lines containing
asciz
from the output (if your assembly language uses another keyword to denote data, use that instead). You will also want to add--color
to the cargo command to retain colour output.The text was updated successfully, but these errors were encountered: