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

Cycle accurate implementation #28

Merged
merged 5 commits into from
Jun 12, 2022
Merged

Cycle accurate implementation #28

merged 5 commits into from
Jun 12, 2022

Conversation

bombela
Copy link

@bombela bombela commented Jun 12, 2022

Below is an example of the code produced. The name of the function is the number of cycles.

test_0:
	ret

test_1:
	nop
	ret

test_2:
.Ltmp0:
	rjmp	.Ltmp0
	ret

test_3:
.Ltmp1:
	rjmp	.Ltmp1
	nop
	ret

test_4:
.Ltmp2:
	rjmp	.Ltmp2
.Ltmp3:
	rjmp	.Ltmp3
	ret

test_5:
.Ltmp4:
	rjmp	.Ltmp4
.Ltmp5:
	rjmp	.Ltmp5
	nop
	ret

test_6:
	ldi	r24, 2
.Ltmp6:
	dec	r24
	brne	.Ltmp6
	ret

test_42:
	ldi	r24, 14
.Ltmp0:
	dec	r24
	brne	.Ltmp0
	ret

test_773:
	ldi	r24, 193
	ldi	r25, 0
.Ltmp25:
	sbiw	r24, 1
	brne	.Ltmp25
	ret

test_262_151:
	ldi	r24, 205
	ldi	r25, 204
	ldi	r18, 0
.Ltmp41:
	sbiw	r24, 1
	sbci	r18, 0
	brne	.Ltmp41
.Ltmp42:
	rjmp	.Ltmp42
.Ltmp43:
	rjmp	.Ltmp43
	ret

test_83_886_087:
	ldi	r24, 86
	ldi	r25, 85
	ldi	r18, 213
	ldi	r19, 0
.Ltmp62:
	sbiw	r24, 1
	sbci	r18, 0
	sbci	r19, 0
	brne	.Ltmp62
	ret

test_25_769_803_784:
	ldi	r24, 0
	ldi	r25, 0
	ldi	r18, 0
	ldi	r19, 0
.Ltmp86:
	sbiw	r24, 1
	sbci	r18, 0
	sbci	r19, 0
	brne	.Ltmp86
.Ltmp87:
	rjmp	.Ltmp87
.Ltmp88:
	rjmp	.Ltmp88
	nop
	ret

@stappersg
Copy link
Member

Commit bombela@c7229a7 should not be in this merge request.

@bombela
Copy link
Author

bombela commented Jun 12, 2022

Commit bombela@c7229a7 should not be in this merge request.

Where should it be then?

@stappersg
Copy link
Member

Commit bombela@c7229a7 should not be in this merge request.

Where should it be then?

In a separate MR

@bombela
Copy link
Author

bombela commented Jun 12, 2022

Ok I moved the offending commit to its own PR #29.

@stappersg stappersg merged commit 48faff1 into avr-rust:cycacc Jun 12, 2022
@stappersg
Copy link
Member

stappersg commented Oct 11, 2022 via email

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