Skip to content
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

fix MIPS target #14455

Closed
wants to merge 1 commit into from
Closed

fix MIPS target #14455

wants to merge 1 commit into from

Conversation

crabtw
Copy link
Contributor

@crabtw crabtw commented May 27, 2014

Because IPv4 address conversion doesn't consider big-endian target, I add functions to handle that.
These function names may need to be changed, but I can't come up with a good one.

@@ -270,7 +270,7 @@ fn initialize_call_frame(regs: &mut Registers, fptr: InitFn, arg: uint,
type Registers = [uint, ..32];

#[cfg(target_arch = "mips")]
fn new_regs() -> Box<Registers> { box [0, .. 32] }
fn new_regs() -> Box<Registers> { box {[0, .. 32]} }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this change needed?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Oh, doesn't matter: I see it's a hold-over from the old days where ~[0, .. 32] would construct a ~[int], not a ~([int, .. 32]).)

@crabtw
Copy link
Contributor Author

crabtw commented May 28, 2014

I removed additional functions and used {from,to}_be32 instead.

@omasanori
Copy link
Contributor

Excuse me. If endianness is the problem, why don't you branch code by target_endian? Are there any reason why only MIPS is affected by this bug?

@crabtw
Copy link
Contributor Author

crabtw commented May 28, 2014

The original PR had functions that were branched by target_endian, but they seemed redundant with {from, to}_be32. Therefore, I removed them later. Only MIPS has the problem because it's the only big-endian target.

Hope these answer your question.

@omasanori
Copy link
Contributor

OK, I understand. Thank you!

bors added a commit that referenced this pull request May 28, 2014
Because IPv4 address conversion doesn't consider big-endian target, I add functions to handle that.
These function names may need to be changed, but I can't come up with a good one.
@bors bors closed this May 28, 2014
@crabtw crabtw deleted the mips branch September 2, 2014 01:52
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 5, 2023
…osure, r=Veykril

Convert nested function to closure assist

Continuation of / closes rust-lang#13467.
Resolves rust-lang#13230.

r? `@Veykril`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants