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

Debian patch(es): ARM support and endian-ness issues #18

Closed
SDLBugzilla opened this issue Feb 11, 2021 · 0 comments
Closed

Debian patch(es): ARM support and endian-ness issues #18

SDLBugzilla opened this issue Feb 11, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: unspecified
Reported for operating system, platform: Linux, Other

Comments on the original bug report:

On 2012-01-20 12:26:38 +0000, wrote:

Created attachment 790
arm.patch

Debian contains the following related patches since 2003. In the patches descriptions it claims to have been forwarded upstream, but I don't know if they have been handled or rejected for some reason.

I am re-reporting them now in the case that it's useful, especially because ARM systems now are very much in the front line, so either one of those:

a) If it's a valid patch, it would be nice to have it upstream
b) If it's not, it's better to remove it from Debian

So here we go.

  1. First Debian bug report: "bad aligned access considerations on ARM"

http://bugs.debian.org/212570

"ARM CPUs like my iPaq's fail on unaligned reads as well. See the following code for instance: [...] Moreover, AFAIK unaligned reads are always decomposed into two aligned reads on modern CPUs. I think it would be wise to drop them completely and always set SDL_DATA_ALIGNED to 1."

The accompanying patch "arm.patch" is trivial to understand and apply.

  1. Second bug report: "SDLNet_(Read|Write)(16|32) assume host endianness is always LE"

http://bugs.debian.org/217221

"When SDL_DATA_ALIGNED is defined, SDLNet_Read16 etc. are defined as
byte-swapping macros. However, since network order is big endian, these
macros should not swap anything on big endian systems. Patch attached."

The accompanying patch "endian.patch" doesn't apply cleanly with 1.2.8 but it does with 1.2.7. In any case it's also easy to understand: it removes conditional execution of code (SDL_BYTEORDER != SDL_BIG_ENDIAN) and keeps only the (SDL_BYTEORDER == SDL_BIG_ENDIAN) version.

Can you please comment if it's a valid fix or not? If not I would like to remove the patches from the .deb packages as soon as possible.

On 2012-01-20 12:27:08 +0000, wrote:

Created attachment 791
endian.patch

On 2012-01-20 16:16:46 +0000, Sam Lantinga wrote:

These patches look good, thanks!
http://hg.libsdl.org/SDL_net/rev/97d99e5c44f4
http://hg.libsdl.org/SDL_net/rev/2eec18011e78

@SDLBugzilla SDLBugzilla added the bug Something isn't working label Feb 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant