Skip to content

*usbd_dwc_otg:misaligned membuf#45

Open
alexrayne wants to merge 1 commit intoinsane-adding-machines:masterfrom
alexrayne:usbd_fifo-unaligned
Open

*usbd_dwc_otg:misaligned membuf#45
alexrayne wants to merge 1 commit intoinsane-adding-machines:masterfrom
alexrayne:usbd_fifo-unaligned

Conversation

@alexrayne
Copy link
Copy Markdown

provided load/store ep fifo with unaligned transfer membuffer.

     now memory buffer of transfer can be unaligned with negligible price.

! :last bytes store - fixed loose of last loaded from fifo bytes caused by memcopy call otimisation on keil ARMcc.

…unaligned membuffer.

         now memory buffer of transfer can be unaligned with negligible price.
!                 :last bytes store - fixed loose of last loaded from fifo bytes
                        caused by memcopy call otimisation on keil ARMcc.
bytes -= 4;
*mem32++ = *fifo;
}
}//if (((uintptr_t)mem & 3) == 0)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code style: 👎

@kuldeepdhaka
Copy link
Copy Markdown
Contributor

Are you trying to fix a [single] compiler specific bug in the library?

@alexrayne
Copy link
Copy Markdown
Author

No, i`ve try to improove FS driver to use misaligned transfers
for HS with DMA usage - it is useless

@kuldeepdhaka
Copy link
Copy Markdown
Contributor

@alexrayne All uC that have this periph have support for unaligned memory access.
What is the point of optimization?

imo If you write a comment noting the above assumption (unaligned memory access supported is assumed), that would be better.

@alexrayne
Copy link
Copy Markdown
Author

well, if you`re are wright - it easy to check, just read uint32 from adress xxxx01, and look at HardFault on ARM CM4

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.

2 participants